项目结构更新

This commit is contained in:
JACKYMYPERSON
2025-09-15 11:09:22 +08:00
parent 2ab7614ea0
commit 8ccf028ae4
25 changed files with 608 additions and 17 deletions

View File

@@ -4,12 +4,12 @@ import (
"fmt"
"github.com/gin-gonic/gin"
"toutoukan/init/redisInit"
"toutoukan/utill"
"toutoukan/utill/jwt"
)
// 登出功能从Redis删除令牌
func LogoutHandler(c *gin.Context) {
tokenString := utill.ExtractTokenFromHeader(c)
tokenString := jwt.ExtractTokenFromHeader(c)
if tokenString == "" {
c.JSON(400, gin.H{"error": "令牌不存在", "code": "10038"})
return