feat: 互动处理

This commit is contained in:
Blizzard
2026-03-05 16:54:25 +08:00
parent 74b252550b
commit 2583b5f302
30 changed files with 412 additions and 119 deletions
+4
View File
@@ -56,6 +56,10 @@ func (a *AuthApi) Login(c *gin.Context) {
func (a *AuthApi) Logout(c *gin.Context) {
token := auth.GetToken(c)
userId := auth.GetUserId(c)
if userId == "" || userId == "0" {
response.FailWithMsg("用户未登录", c)
return
}
err := jwtService.PutBlacklist(userId, token)
if err != nil {
global.Logger.Error("登出失败!", zap.Error(err))