mirror of
https://github.com/HChaZZY/alist.git
synced 2025-12-06 11:03:49 +08:00
fix(webauthn): handle error when removing webauthn credential (#7689)
This commit is contained in:
@@ -207,6 +207,10 @@ func DeleteAuthnLogin(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
err = db.RemoveAuthn(user, req.ID)
|
err = db.RemoveAuthn(user, req.ID)
|
||||||
|
if err != nil {
|
||||||
|
common.ErrorResp(c, err, 400)
|
||||||
|
return
|
||||||
|
}
|
||||||
err = op.DelUserCache(user.Username)
|
err = op.DelUserCache(user.Username)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
common.ErrorResp(c, err, 400)
|
common.ErrorResp(c, err, 400)
|
||||||
|
|||||||
Reference in New Issue
Block a user