Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove inaccurate rating change check #180

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions internal/v1/user/visitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,19 +316,6 @@ func isEligibleVisiting(user *models.User) bool {
return false
}

ratechange, err := vatsim.GetDateOfRatingChange(fmt.Sprint(user.CID))
if err != nil {
log.Errorf("Error getting date of rating change: %s", err)
return false
}

// Check that ratechange is more than 90 days ago
// VATSIM API apparently returns nil if it was a long time ago... so we can assume this check is true
// VATUSA only knows about controllers whose rating is changed by VATUSA, so we enforce this by also checking VATSIM
if ratechange != nil && ratechange.After(time.Now().AddDate(0, 0, -90)) {
return false
}

// Check VATUSA eligibility
eligible, _, err := vatusa.IsVisitorEligible(fmt.Sprint(user.CID))
if err != nil {
Expand Down
Loading