fix: 🐛 fix usage of errors.Is
continuous-integration/drone/push Build is passing Details

main
RaviAnand Mohabir 1 year ago
parent ef8f38fc52
commit 17051afc57

@ -78,7 +78,7 @@ func SaveUserToken(ctx context.Context, app *core.App, spotifyID string, token *
coll := app.MongoClient.Database("listy").Collection("users")
result, err := GetUser(ctx, app, spotifyID)
if err != nil && !errors.Is(mongo.ErrNoDocuments, err) {
if err != nil && !errors.Is(err, mongo.ErrNoDocuments) {
return nil, fmt.Errorf("couldn't fetch user %v", err)
}

Loading…
Cancel
Save