feat: return error for updateUsedByCode()

This commit is contained in:
hsluoyz
2025-02-05 13:40:41 +08:00
parent ca60cc3a33
commit 1600a6799a
2 changed files with 7 additions and 4 deletions

View File

@ -248,7 +248,10 @@ func GetOAuthToken(grantType string, clientId string, clientSecret string, code
token.CodeIsUsed = true
go updateUsedByCode(token)
_, err = updateUsedByCode(token)
if err != nil {
return nil, err
}
tokenWrapper := &TokenWrapper{
AccessToken: token.AccessToken,