|
@@ -737,22 +737,18 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
|
)
|
|
)
|
|
|
|
|
|
server.AddRoutes(
|
|
server.AddRoutes(
|
|
- rest.WithMiddlewares(
|
|
|
|
- []rest.Middleware{serverCtx.Miniprogram},
|
|
|
|
- []rest.Route{
|
|
|
|
- {
|
|
|
|
- Method: http.MethodPost,
|
|
|
|
- Path: "/api/employee/list",
|
|
|
|
- Handler: employee.GetApiEmployeeListHandler(serverCtx),
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- Method: http.MethodPost,
|
|
|
|
- Path: "/api/employee/detail",
|
|
|
|
- Handler: employee.GetApiEmployeeDetailHandler(serverCtx),
|
|
|
|
- },
|
|
|
|
- }...,
|
|
|
|
- ),
|
|
|
|
- rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
|
|
|
|
|
|
+ []rest.Route{
|
|
|
|
+ {
|
|
|
|
+ Method: http.MethodPost,
|
|
|
|
+ Path: "/api/employee/list",
|
|
|
|
+ Handler: employee.GetApiEmployeeListHandler(serverCtx),
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ Method: http.MethodPost,
|
|
|
|
+ Path: "/api/employee/detail",
|
|
|
|
+ Handler: employee.GetApiEmployeeDetailHandler(serverCtx),
|
|
|
|
+ },
|
|
|
|
+ },
|
|
)
|
|
)
|
|
|
|
|
|
server.AddRoutes(
|
|
server.AddRoutes(
|
|
@@ -936,20 +932,6 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
|
)
|
|
)
|
|
|
|
|
|
server.AddRoutes(
|
|
server.AddRoutes(
|
|
- rest.WithMiddlewares(
|
|
|
|
- []rest.Middleware{serverCtx.Miniprogram},
|
|
|
|
- []rest.Route{
|
|
|
|
- {
|
|
|
|
- Method: http.MethodPost,
|
|
|
|
- Path: "/api/category/list",
|
|
|
|
- Handler: category.GetApiCategoryListHandler(serverCtx),
|
|
|
|
- },
|
|
|
|
- }...,
|
|
|
|
- ),
|
|
|
|
- rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
|
|
|
|
- )
|
|
|
|
-
|
|
|
|
- server.AddRoutes(
|
|
|
|
[]rest.Route{
|
|
[]rest.Route{
|
|
{
|
|
{
|
|
Method: http.MethodPost,
|
|
Method: http.MethodPost,
|
|
@@ -961,6 +943,11 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
|
Path: "/category",
|
|
Path: "/category",
|
|
Handler: category.GetCategoryByIdHandler(serverCtx),
|
|
Handler: category.GetCategoryByIdHandler(serverCtx),
|
|
},
|
|
},
|
|
|
|
+ {
|
|
|
|
+ Method: http.MethodPost,
|
|
|
|
+ Path: "/api/category/list",
|
|
|
|
+ Handler: category.GetApiCategoryListHandler(serverCtx),
|
|
|
|
+ },
|
|
},
|
|
},
|
|
)
|
|
)
|
|
|
|
|