This commit is contained in:
2026-08-15 01:12:04 +08:00
parent f63acae353
commit 6698e59c3a
45 changed files with 725 additions and 415 deletions
+2 -2
View File
@@ -16,9 +16,9 @@ func (h *Session) Logout(c *gin.Context) {
token, _ = c.Cookie("x-token")
}
if err := h.settings.BlacklistToken(c.Request.Context(), token); err != nil {
httpx.Fail(c, "退出失败")
httpx.Fail(c, "jwt作废失败")
return
}
httpx.SetTokenCookie(c, "", -1)
httpx.OK(c)
httpx.Write(c, httpx.CodeSuccess, gin.H{}, "jwt作废成功")
}