This commit is contained in:
chy
2025-06-05 10:20:01 +08:00
parent a9dabbbe21
commit 27c6445fe6
5 changed files with 1 additions and 49 deletions

View File

@ -1,5 +0,0 @@
// =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
// =================================================================================
package user

View File

@ -1,15 +0,0 @@
// =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
// =================================================================================
package user
import (
"server/api/user"
)
type ControllerV1 struct{}
func NewV1() user.IUserV1 {
return &ControllerV1{}
}

View File

@ -1,14 +0,0 @@
package user
import (
"context"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
"server/api/user/v1"
)
func (c *ControllerV1) Info(ctx context.Context, req *v1.InfoReq) (res *v1.InfoRes, err error) {
return nil, gerror.NewCode(gcode.CodeNotImplemented)
}

View File

@ -1,14 +0,0 @@
package user
import (
"context"
"github.com/gogf/gf/v2/errors/gcode"
"github.com/gogf/gf/v2/errors/gerror"
"server/api/user/v1"
)
func (c *ControllerV1) List(ctx context.Context, req *v1.ListReq) (res *v1.ListRes, err error) {
return nil, gerror.NewCode(gcode.CodeNotImplemented)
}

View File

@ -40,7 +40,7 @@ func Auth(r *ghttp.Request) {
if err != nil {
Exit(r, err)
}
r.SetCtxVar("userId", tokenOut.UserId)
r.SetCtxVar("id", tokenOut.UserId)
r.SetCtxVar("role", tokenOut.Role)
r.SetCtxVar("jti", tokenOut.JTI)
}