This commit is contained in:
laodaming
2023-06-12 17:16:06 +08:00
parent c71fa6fc12
commit acc6f9c2b4
15 changed files with 28 additions and 16 deletions

View File

@@ -25,6 +25,7 @@ func GetProductListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
Message: "unauthorized",
})
logx.Info("unauthorized:", err.Error())
return
}
// 从Token里获取对应的信息
@@ -36,6 +37,7 @@ func GetProductListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
Message: "unauthorized",
})
logx.Info("unauthorized:", err.Error())
return
}
var req types.GetProductListReq
@@ -60,5 +62,6 @@ func GetProductListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
httpx.ErrorCtx(r.Context(), w, err)
logx.Error(err)
}
return
}
}

View File

@@ -25,6 +25,7 @@ func GetSizeByProductHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
Message: "unauthorized",
})
logx.Info("unauthorized:", err.Error())
return
}
// 从Token里获取对应的信息
@@ -36,6 +37,7 @@ func GetSizeByProductHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
Message: "unauthorized",
})
logx.Info("unauthorized:", err.Error())
return
}
l := logic.NewGetSizeByProductLogic(r.Context(), svcCtx)
@@ -49,5 +51,6 @@ func GetSizeByProductHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
httpx.ErrorCtx(r.Context(), w, err)
logx.Error(err)
}
return
}
}

View File

@@ -25,6 +25,7 @@ func GetSuccessRecommandHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
Message: "unauthorized",
})
logx.Info("unauthorized:", err.Error())
return
}
// 从Token里获取对应的信息
@@ -36,6 +37,7 @@ func GetSuccessRecommandHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
Message: "unauthorized",
})
logx.Info("unauthorized:", err.Error())
return
}
var req types.GetSuccessRecommandReq
@@ -60,5 +62,6 @@ func GetSuccessRecommandHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
httpx.ErrorCtx(r.Context(), w, err)
logx.Error(err)
}
return
}
}

View File

@@ -28,6 +28,5 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
Handler: GetSizeByProductHandler(serverCtx),
},
},
rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
)
}