查询当前登录用户排名,

This commit is contained in:
chy
2025-06-10 09:50:23 +08:00
parent 2819b9e9c2
commit 81c2769b92
22 changed files with 505 additions and 33 deletions

View File

@ -31,7 +31,7 @@ func Auth(r *ghttp.Request) {
ctx := r.GetCtx()
if token == "" {
glog.Infof(ctx, "未登录用户访问: %s %s", r.URL.Path, r.Method)
r.SetCtxVar("permission", "guest")
r.SetCtxVar("role", "guest")
} else {
if !strings.HasPrefix(token, "Bearer ") {
Exit(r, ecode.InvalidOperation.Sub("无效的token格式"))