|
@@ -22,25 +22,10 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { |
|
@@ -22,25 +22,10 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { |
|
22
|
server.AddRoutes(
|
22
|
server.AddRoutes(
|
|
23
|
[]rest.Route{
|
23
|
[]rest.Route{
|
|
24
|
{
|
24
|
{
|
|
25
|
- Method: http.MethodPost,
|
|
|
|
26
|
- Path: "/common/sms/code",
|
|
|
|
27
|
- Handler: common.CommonSmsCodeHandler(serverCtx),
|
|
|
|
28
|
- },
|
|
|
|
29
|
- {
|
|
|
|
30
|
- Method: http.MethodPost,
|
|
|
|
31
|
- Path: "/mini/qrcode",
|
|
|
|
32
|
- Handler: common.MiniQrcodeInviteHandler(serverCtx),
|
|
|
|
33
|
- },
|
|
|
|
34
|
- {
|
|
|
|
35
|
Method: http.MethodGet,
|
25
|
Method: http.MethodGet,
|
|
36
|
Path: "/log/:module",
|
26
|
Path: "/log/:module",
|
|
37
|
Handler: common.CommonGetLogHandler(serverCtx),
|
27
|
Handler: common.CommonGetLogHandler(serverCtx),
|
|
38
|
},
|
28
|
},
|
|
39
|
- {
|
|
|
|
40
|
- Method: http.MethodGet,
|
|
|
|
41
|
- Path: "/clear",
|
|
|
|
42
|
- Handler: common.CommonGetClearCacheHandler(serverCtx),
|
|
|
|
43
|
- },
|
|
|
|
44
|
},
|
29
|
},
|
|
45
|
rest.WithPrefix("/v1"),
|
30
|
rest.WithPrefix("/v1"),
|
|
46
|
)
|
31
|
)
|
|
@@ -51,6 +36,30 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { |
|
@@ -51,6 +36,30 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { |
|
51
|
[]rest.Route{
|
36
|
[]rest.Route{
|
|
52
|
{
|
37
|
{
|
|
53
|
Method: http.MethodPost,
|
38
|
Method: http.MethodPost,
|
|
|
|
39
|
+ Path: "/common/sms/code",
|
|
|
|
40
|
+ Handler: common.CommonSmsCodeHandler(serverCtx),
|
|
|
|
41
|
+ },
|
|
|
|
42
|
+ {
|
|
|
|
43
|
+ Method: http.MethodPost,
|
|
|
|
44
|
+ Path: "/mini/qrcode",
|
|
|
|
45
|
+ Handler: common.MiniQrcodeInviteHandler(serverCtx),
|
|
|
|
46
|
+ },
|
|
|
|
47
|
+ {
|
|
|
|
48
|
+ Method: http.MethodGet,
|
|
|
|
49
|
+ Path: "/clear",
|
|
|
|
50
|
+ Handler: common.CommonGetClearCacheHandler(serverCtx),
|
|
|
|
51
|
+ },
|
|
|
|
52
|
+ }...,
|
|
|
|
53
|
+ ),
|
|
|
|
54
|
+ rest.WithPrefix("/v1"),
|
|
|
|
55
|
+ )
|
|
|
|
56
|
+
|
|
|
|
57
|
+ server.AddRoutes(
|
|
|
|
58
|
+ rest.WithMiddlewares(
|
|
|
|
59
|
+ []rest.Middleware{serverCtx.LogRequest},
|
|
|
|
60
|
+ []rest.Route{
|
|
|
|
61
|
+ {
|
|
|
|
62
|
+ Method: http.MethodPost,
|
|
54
|
Path: "/article_comment",
|
63
|
Path: "/article_comment",
|
|
55
|
Handler: comment.MiniCreateArticleCommentHandler(serverCtx),
|
64
|
Handler: comment.MiniCreateArticleCommentHandler(serverCtx),
|
|
56
|
},
|
65
|
},
|