u
This commit is contained in:
1 parent
b1348343c9
commit
b7f2efc7c3
13 files changed
+662
-456
No files matched your search
@@ -20,14 +20,14 @@ func Auth() fiber.Handler {
|
||||
return httpx.Unauthorized(c, "未登录")
|
||||
}
|
||||
|
||||
_, ok := jwtx.VerifyToken(c.Context(), token)
|
||||
verifyToken, ok := jwtx.VerifyToken(c.Context(), token)
|
||||
if !ok {
|
||||
return httpx.Unauthorized(c, "登录已过期")
|
||||
}
|
||||
|
||||
//ctx := context.WithValue(c.Context(), CtxUserIDKey, verifyToken.Data.UserID)
|
||||
ctx := context.WithValue(c.Context(), CtxUserIDKey, verifyToken.Data.UserID)
|
||||
|
||||
ctx := context.WithValue(c.Context(), CtxUserIDKey, int64(796541901389893))
|
||||
//ctx := context.WithValue(c.Context(), CtxUserIDKey, int64(796541901389893))
|
||||
|
||||
c.SetContext(ctx)
|
||||
|
||||
|
||||
Reference in new issue
Block a user