fix
This commit is contained in:
@@ -7,14 +7,16 @@ import (
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
|
||||
"fusenapi/utils/auth"
|
||||
"fusenapi/utils/basic"
|
||||
|
||||
"fusenapi/server/map_library/internal/logic"
|
||||
"fusenapi/server/map_library/internal/svc"
|
||||
"fusenapi/utils/auth"
|
||||
)
|
||||
|
||||
func GetMapLibraryListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
/*// 解析jwtToken
|
||||
// 解析jwtToken
|
||||
claims, err := svcCtx.ParseJwtToken(r)
|
||||
// 如果解析出错,则返回未授权的JSON响应并记录错误消息
|
||||
if err != nil {
|
||||
@@ -36,10 +38,10 @@ func GetMapLibraryListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
})
|
||||
logx.Info("unauthorized:", err.Error())
|
||||
return
|
||||
}*/
|
||||
}
|
||||
|
||||
l := logic.NewGetMapLibraryListLogic(r.Context(), svcCtx)
|
||||
resp := l.GetMapLibraryList(&auth.UserInfo{86})
|
||||
resp := l.GetMapLibraryList(userinfo)
|
||||
// 如果响应不为nil,则使用httpx.OkJsonCtx方法返回JSON响应;
|
||||
// 否则,发送500内部服务器错误的JSON响应并记录错误消息logx.Error。
|
||||
if resp != nil {
|
||||
|
||||
Reference in New Issue
Block a user