more refactors :)

This commit is contained in:
2026-02-08 20:52:58 +11:00
parent d038f7a42d
commit fa3b8e3982
10 changed files with 28 additions and 50 deletions

View File

@@ -34,6 +34,9 @@ func (s *Store) CheckToken(user *db.User) *db.DiscordToken {
check := (res).(*TokenCheck)
check.ExpiresAt = time.Now().Add(5 * time.Minute)
s.tokenchecks.Delete(user.ID)
s.tokenchecks.Store(user.ID, check)
s.tokenchecks.Store(user.ID, &TokenCheck{
Token: check.Token,
ExpiresAt: time.Now().Add(5 * time.Minute),
})
return check.Token
}