From 9b82fa7828946803289add03fc84be1dc4f86d8b Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 10 Jun 2023 01:02:31 -0400 Subject: [PATCH] fix: use challengeObj --- service/auth/auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/auth/auth.go b/service/auth/auth.go index 7b70ab3..61b13af 100644 --- a/service/auth/auth.go +++ b/service/auth/auth.go @@ -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 }