项目结构更新
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user