Skip to content

Commit

Permalink
copy in scopes
Browse files Browse the repository at this point in the history
  • Loading branch information
antihax committed Nov 1, 2021
1 parent ba5c014 commit bb23b84
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 23 deletions.
15 changes: 0 additions & 15 deletions services/vanguard/models/contactSync.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,3 @@ type ExpiredContactSync struct {
Destinations string `db:"destinations" json:"destinations"`
CharacterID int32 `db:"characterID" json:"characterID"`
}

func GetExpiredContactSyncs() ([]ExpiredContactSync, error) {
ecc := []ExpiredContactSync{}
if err := database.Select(&ecc, `
SELECT S.characterID, source, group_concat(destination) AS destinations
FROM evedata.contactSyncs S
INNER JOIN evedata.crestTokens T ON T.tokenCharacterID = destination
WHERE lastStatus != "invalid_token"
GROUP BY source
HAVING max(nextSync) < UTC_TIMESTAMP();`); err != nil {

return nil, err
}
return ecc, nil
}
8 changes: 0 additions & 8 deletions services/vanguard/models/contactSync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,3 @@ func TestDeleteContactSync(t *testing.T) {
return
}
}

func TestGetExpiredContactSyncs(t *testing.T) {
_, err := GetExpiredContactSyncs()
if err != nil {
t.Error(err)
return
}
}
1 change: 1 addition & 0 deletions services/vanguard/vanguard.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ func (s *Vanguard) JWTVerify(token string) (*goesi.VerifyResponse, error) {
CharacterName: claims.Name,
CharacterID: int32(cid),
CharacterOwnerHash: claims.Owner,
Scopes: strings.Join(claims.Scopes, " "),
}
return v, nil
}

0 comments on commit bb23b84

Please sign in to comment.