...
|
...
|
@@ -22,25 +22,10 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { |
|
|
server.AddRoutes(
|
|
|
[]rest.Route{
|
|
|
{
|
|
|
Method: http.MethodPost,
|
|
|
Path: "/common/sms/code",
|
|
|
Handler: common.CommonSmsCodeHandler(serverCtx),
|
|
|
},
|
|
|
{
|
|
|
Method: http.MethodPost,
|
|
|
Path: "/mini/qrcode",
|
|
|
Handler: common.MiniQrcodeInviteHandler(serverCtx),
|
|
|
},
|
|
|
{
|
|
|
Method: http.MethodGet,
|
|
|
Path: "/log/:module",
|
|
|
Handler: common.CommonGetLogHandler(serverCtx),
|
|
|
},
|
|
|
{
|
|
|
Method: http.MethodGet,
|
|
|
Path: "/clear",
|
|
|
Handler: common.CommonGetClearCacheHandler(serverCtx),
|
|
|
},
|
|
|
},
|
|
|
rest.WithPrefix("/v1"),
|
|
|
)
|
...
|
...
|
@@ -51,6 +36,30 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { |
|
|
[]rest.Route{
|
|
|
{
|
|
|
Method: http.MethodPost,
|
|
|
Path: "/common/sms/code",
|
|
|
Handler: common.CommonSmsCodeHandler(serverCtx),
|
|
|
},
|
|
|
{
|
|
|
Method: http.MethodPost,
|
|
|
Path: "/mini/qrcode",
|
|
|
Handler: common.MiniQrcodeInviteHandler(serverCtx),
|
|
|
},
|
|
|
{
|
|
|
Method: http.MethodGet,
|
|
|
Path: "/clear",
|
|
|
Handler: common.CommonGetClearCacheHandler(serverCtx),
|
|
|
},
|
|
|
}...,
|
|
|
),
|
|
|
rest.WithPrefix("/v1"),
|
|
|
)
|
|
|
|
|
|
server.AddRoutes(
|
|
|
rest.WithMiddlewares(
|
|
|
[]rest.Middleware{serverCtx.LogRequest},
|
|
|
[]rest.Route{
|
|
|
{
|
|
|
Method: http.MethodPost,
|
|
|
Path: "/article_comment",
|
|
|
Handler: comment.MiniCreateArticleCommentHandler(serverCtx),
|
|
|
},
|
...
|
...
|
|