This commit is contained in:
oneao committed 2026-04-21 22:12:34 +08:00
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)