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

View File

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

View File

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