|
@@ -733,22 +733,18 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
|
|
)
|
|
|
|
|
|
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(
|
|
@@ -932,17 +928,13 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
|
|
)
|
|
|
|
|
|
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),
|
|
|
+ []rest.Route{
|
|
|
+ {
|
|
|
+ Method: http.MethodPost,
|
|
|
+ Path: "/api/category/list",
|
|
|
+ Handler: category.GetApiCategoryListHandler(serverCtx),
|
|
|
+ },
|
|
|
+ },
|
|
|
)
|
|
|
|
|
|
server.AddRoutes(
|
|
@@ -1019,27 +1011,23 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
|
|
)
|
|
|
|
|
|
server.AddRoutes(
|
|
|
- rest.WithMiddlewares(
|
|
|
- []rest.Middleware{serverCtx.Miniprogram},
|
|
|
- []rest.Route{
|
|
|
- {
|
|
|
- Method: http.MethodPost,
|
|
|
- Path: "/api/chat/create",
|
|
|
- Handler: chatrecords.SubmitApiChatHandler(serverCtx),
|
|
|
- },
|
|
|
- {
|
|
|
- Method: http.MethodPost,
|
|
|
- Path: "/api/chat/list",
|
|
|
- Handler: chatrecords.GetApiChatListHandler(serverCtx),
|
|
|
- },
|
|
|
- {
|
|
|
- Method: http.MethodPost,
|
|
|
- Path: "/api/chat/save",
|
|
|
- Handler: chatrecords.SaveApiChatHandler(serverCtx),
|
|
|
- },
|
|
|
- }...,
|
|
|
- ),
|
|
|
- rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
|
|
|
+ []rest.Route{
|
|
|
+ {
|
|
|
+ Method: http.MethodPost,
|
|
|
+ Path: "/api/chat/create",
|
|
|
+ Handler: chatrecords.SubmitApiChatHandler(serverCtx),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ Method: http.MethodPost,
|
|
|
+ Path: "/api/chat/list",
|
|
|
+ Handler: chatrecords.GetApiChatListHandler(serverCtx),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ Method: http.MethodPost,
|
|
|
+ Path: "/api/chat/save",
|
|
|
+ Handler: chatrecords.SaveApiChatHandler(serverCtx),
|
|
|
+ },
|
|
|
+ },
|
|
|
)
|
|
|
|
|
|
server.AddRoutes(
|
|
@@ -1077,27 +1065,23 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
|
|
)
|
|
|
|
|
|
server.AddRoutes(
|
|
|
- rest.WithMiddlewares(
|
|
|
- []rest.Middleware{serverCtx.Miniprogram},
|
|
|
- []rest.Route{
|
|
|
- {
|
|
|
- Method: http.MethodPost,
|
|
|
- Path: "/api/session/list",
|
|
|
- Handler: chatsession.GetApiSessionListHandler(serverCtx),
|
|
|
- },
|
|
|
- {
|
|
|
- Method: http.MethodPost,
|
|
|
- Path: "/api/session/update",
|
|
|
- Handler: chatsession.UpdateApiSessionHandler(serverCtx),
|
|
|
- },
|
|
|
- {
|
|
|
- Method: http.MethodPost,
|
|
|
- Path: "/api/session/delete",
|
|
|
- Handler: chatsession.DeleteApiSessionHandler(serverCtx),
|
|
|
- },
|
|
|
- }...,
|
|
|
- ),
|
|
|
- rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
|
|
|
+ []rest.Route{
|
|
|
+ {
|
|
|
+ Method: http.MethodPost,
|
|
|
+ Path: "/api/session/list",
|
|
|
+ Handler: chatsession.GetApiSessionListHandler(serverCtx),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ Method: http.MethodPost,
|
|
|
+ Path: "/api/session/update",
|
|
|
+ Handler: chatsession.UpdateApiSessionHandler(serverCtx),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ Method: http.MethodPost,
|
|
|
+ Path: "/api/session/delete",
|
|
|
+ Handler: chatsession.DeleteApiSessionHandler(serverCtx),
|
|
|
+ },
|
|
|
+ },
|
|
|
)
|
|
|
|
|
|
server.AddRoutes(
|
|
@@ -1135,17 +1119,13 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
|
|
)
|
|
|
|
|
|
server.AddRoutes(
|
|
|
- rest.WithMiddlewares(
|
|
|
- []rest.Middleware{serverCtx.Miniprogram},
|
|
|
- []rest.Route{
|
|
|
- {
|
|
|
- Method: http.MethodPost,
|
|
|
- Path: "/api/card/detail",
|
|
|
- Handler: wxcard.GetApiWxCardDetailHandler(serverCtx),
|
|
|
- },
|
|
|
- }...,
|
|
|
- ),
|
|
|
- rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
|
|
|
+ []rest.Route{
|
|
|
+ {
|
|
|
+ Method: http.MethodPost,
|
|
|
+ Path: "/api/card/detail",
|
|
|
+ Handler: wxcard.GetApiWxCardDetailHandler(serverCtx),
|
|
|
+ },
|
|
|
+ },
|
|
|
)
|
|
|
|
|
|
server.AddRoutes(
|
|
@@ -1183,17 +1163,13 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
|
|
)
|
|
|
|
|
|
server.AddRoutes(
|
|
|
- rest.WithMiddlewares(
|
|
|
- []rest.Middleware{serverCtx.Miniprogram},
|
|
|
- []rest.Route{
|
|
|
- {
|
|
|
- Method: http.MethodPost,
|
|
|
- Path: "/api/user/update",
|
|
|
- Handler: wxcarduser.UpdateApiWxCardUserHandler(serverCtx),
|
|
|
- },
|
|
|
- }...,
|
|
|
- ),
|
|
|
- rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
|
|
|
+ []rest.Route{
|
|
|
+ {
|
|
|
+ Method: http.MethodPost,
|
|
|
+ Path: "/api/user/update",
|
|
|
+ Handler: wxcarduser.UpdateApiWxCardUserHandler(serverCtx),
|
|
|
+ },
|
|
|
+ },
|
|
|
)
|
|
|
|
|
|
server.AddRoutes(
|
|
@@ -1231,22 +1207,18 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
|
|
)
|
|
|
|
|
|
server.AddRoutes(
|
|
|
- rest.WithMiddlewares(
|
|
|
- []rest.Middleware{serverCtx.Miniprogram},
|
|
|
- []rest.Route{
|
|
|
- {
|
|
|
- Method: http.MethodPost,
|
|
|
- Path: "/api/card/visit",
|
|
|
- Handler: wxcardvisit.SubmitApiWxCardVisitHandler(serverCtx),
|
|
|
- },
|
|
|
- {
|
|
|
- Method: http.MethodPost,
|
|
|
- Path: "/api/card/visit/history",
|
|
|
- Handler: wxcardvisit.GetApiWxCardVisitListHandler(serverCtx),
|
|
|
- },
|
|
|
- }...,
|
|
|
- ),
|
|
|
- rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
|
|
|
+ []rest.Route{
|
|
|
+ {
|
|
|
+ Method: http.MethodPost,
|
|
|
+ Path: "/api/card/visit",
|
|
|
+ Handler: wxcardvisit.SubmitApiWxCardVisitHandler(serverCtx),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ Method: http.MethodPost,
|
|
|
+ Path: "/api/card/visit/history",
|
|
|
+ Handler: wxcardvisit.GetApiWxCardVisitListHandler(serverCtx),
|
|
|
+ },
|
|
|
+ },
|
|
|
)
|
|
|
|
|
|
server.AddRoutes(
|