fix
This commit is contained in:
@@ -2,7 +2,6 @@ package handler
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fusenapi/utils/auth"
|
||||
"net/http"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
@@ -15,8 +14,6 @@ import (
|
||||
|
||||
func GetProductListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
//用户登录信息
|
||||
userInfo := auth.CheckAuth(r)
|
||||
var req types.GetProductListReq
|
||||
if err := httpx.Parse(r, &req); err != nil {
|
||||
httpx.OkJsonCtx(r.Context(), w, &types.Response{
|
||||
@@ -28,7 +25,7 @@ func GetProductListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
}
|
||||
|
||||
l := logic.NewGetProductListLogic(r.Context(), svcCtx)
|
||||
resp := l.GetProductList(&req, userInfo)
|
||||
resp := l.GetProductList(&req)
|
||||
if resp != nil {
|
||||
httpx.OkJsonCtx(r.Context(), w, resp)
|
||||
} else {
|
||||
|
||||
@@ -2,7 +2,6 @@ package handler
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fusenapi/utils/auth"
|
||||
"net/http"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
@@ -15,8 +14,6 @@ import (
|
||||
|
||||
func GetSuccessRecommandHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
//用户登录信息
|
||||
userInfo := auth.CheckAuth(r)
|
||||
var req types.GetSuccessRecommandReq
|
||||
if err := httpx.Parse(r, &req); err != nil {
|
||||
httpx.OkJsonCtx(r.Context(), w, &types.Response{
|
||||
@@ -28,7 +25,7 @@ func GetSuccessRecommandHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
}
|
||||
|
||||
l := logic.NewGetSuccessRecommandLogic(r.Context(), svcCtx)
|
||||
resp := l.GetSuccessRecommand(&req, userInfo)
|
||||
resp := l.GetSuccessRecommand(&req)
|
||||
if resp != nil {
|
||||
httpx.OkJsonCtx(r.Context(), w, resp)
|
||||
} else {
|
||||
|
||||
@@ -23,5 +23,6 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
Handler: GetSuccessRecommandHandler(serverCtx),
|
||||
},
|
||||
},
|
||||
rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user