fix(webauthn): handle error when removing webauthn credential (#7689)

pull/7673/head
Feng.YJ 2024-12-25 21:16:34 +08:00 committed by GitHub
parent c218b5701e
commit 5ecf5e823c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -207,6 +207,10 @@ func DeleteAuthnLogin(c *gin.Context) {
return
}
err = db.RemoveAuthn(user, req.ID)
if err != nil {
common.ErrorResp(c, err, 400)
return
}
err = op.DelUserCache(user.Username)
if err != nil {
common.ErrorResp(c, err, 400)