fix: use challengeObj

This commit is contained in:
Derrick Hammer 2023-06-10 01:02:31 -04:00
parent bf576dfaee
commit 9b82fa7828
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 1 deletions

View File

@ -181,7 +181,7 @@ func LoginWithPubkey(pubkey string, challenge string, signature string) (string,
return "", ErrFailedInvalidateToken
}
if err := db.Get().Delete(&challenge).Error; err != nil {
if err := db.Get().Delete(&challengeObj).Error; err != nil {
logger.Get().Debug(ErrFailedDeleteKeyChallenge.Error(), zap.Error(err))
return "", ErrFailedDeleteKeyChallenge
}