...
|
...
|
@@ -36,6 +36,8 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { |
|
|
)
|
|
|
|
|
|
server.AddRoutes(
|
|
|
rest.WithMiddlewares(
|
|
|
[]rest.Middleware{serverCtx.LogRequest},
|
|
|
[]rest.Route{
|
|
|
{
|
|
|
Method: http.MethodPost,
|
...
|
...
|
@@ -67,14 +69,15 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { |
|
|
Path: "/article_comment/at_who/list",
|
|
|
Handler: comment.MiniArticleCommentAtWhoHandler(serverCtx),
|
|
|
},
|
|
|
},
|
|
|
}...,
|
|
|
),
|
|
|
rest.WithJwt(serverCtx.Config.MiniAuth.AccessSecret),
|
|
|
rest.WithPrefix("/v1/mini"),
|
|
|
)
|
|
|
|
|
|
server.AddRoutes(
|
|
|
rest.WithMiddlewares(
|
|
|
[]rest.Middleware{serverCtx.LoginStatusCheck},
|
|
|
[]rest.Middleware{serverCtx.LoginStatusCheck, serverCtx.LogRequest},
|
|
|
[]rest.Route{
|
|
|
{
|
|
|
Method: http.MethodPost,
|
...
|
...
|
@@ -113,6 +116,8 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { |
|
|
)
|
|
|
|
|
|
server.AddRoutes(
|
|
|
rest.WithMiddlewares(
|
|
|
[]rest.Middleware{serverCtx.LogRequest},
|
|
|
[]rest.Route{
|
|
|
{
|
|
|
Method: http.MethodPost,
|
...
|
...
|
@@ -129,14 +134,15 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { |
|
|
Path: "/mini/message/like",
|
|
|
Handler: message.MiniLikeHandler(serverCtx),
|
|
|
},
|
|
|
},
|
|
|
}...,
|
|
|
),
|
|
|
rest.WithJwt(serverCtx.Config.MiniAuth.AccessSecret),
|
|
|
rest.WithPrefix("/v1"),
|
|
|
)
|
|
|
|
|
|
server.AddRoutes(
|
|
|
rest.WithMiddlewares(
|
|
|
[]rest.Middleware{serverCtx.LoginStatusCheck},
|
|
|
[]rest.Middleware{serverCtx.LoginStatusCheck, serverCtx.LogRequest},
|
|
|
[]rest.Route{
|
|
|
{
|
|
|
Method: http.MethodPost,
|
...
|
...
|
@@ -191,6 +197,8 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { |
|
|
)
|
|
|
|
|
|
server.AddRoutes(
|
|
|
rest.WithMiddlewares(
|
|
|
[]rest.Middleware{serverCtx.LogRequest},
|
|
|
[]rest.Route{
|
|
|
{
|
|
|
Method: http.MethodPost,
|
...
|
...
|
@@ -267,14 +275,15 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { |
|
|
Path: "/mini/user/mylike",
|
|
|
Handler: user.MiniMyLikeHandler(serverCtx),
|
|
|
},
|
|
|
},
|
|
|
}...,
|
|
|
),
|
|
|
rest.WithJwt(serverCtx.Config.MiniAuth.AccessSecret),
|
|
|
rest.WithPrefix("/v1"),
|
|
|
)
|
|
|
|
|
|
server.AddRoutes(
|
|
|
rest.WithMiddlewares(
|
|
|
[]rest.Middleware{serverCtx.LoginStatusCheck},
|
|
|
[]rest.Middleware{serverCtx.LoginStatusCheck, serverCtx.LogRequest},
|
|
|
[]rest.Route{
|
|
|
{
|
|
|
Method: http.MethodPost,
|
...
|
...
|
@@ -338,31 +347,37 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { |
|
|
)
|
|
|
|
|
|
server.AddRoutes(
|
|
|
rest.WithMiddlewares(
|
|
|
[]rest.Middleware{serverCtx.LogRequest},
|
|
|
[]rest.Route{
|
|
|
{
|
|
|
Method: http.MethodPost,
|
|
|
Path: "/mini/company/search",
|
|
|
Handler: company.MiniCompanySearchHandler(serverCtx),
|
|
|
},
|
|
|
},
|
|
|
}...,
|
|
|
),
|
|
|
rest.WithPrefix("/v1"),
|
|
|
)
|
|
|
|
|
|
server.AddRoutes(
|
|
|
rest.WithMiddlewares(
|
|
|
[]rest.Middleware{serverCtx.LogRequest},
|
|
|
[]rest.Route{
|
|
|
{
|
|
|
Method: http.MethodPost,
|
|
|
Path: "/mini/company/search-joined",
|
|
|
Handler: company.MiniCompanySearchJoinedHandler(serverCtx),
|
|
|
},
|
|
|
},
|
|
|
}...,
|
|
|
),
|
|
|
rest.WithJwt(serverCtx.Config.MiniAuth.AccessSecret),
|
|
|
rest.WithPrefix("/v1"),
|
|
|
)
|
|
|
|
|
|
server.AddRoutes(
|
|
|
rest.WithMiddlewares(
|
|
|
[]rest.Middleware{serverCtx.LoginStatusCheck},
|
|
|
[]rest.Middleware{serverCtx.LoginStatusCheck, serverCtx.LogRequest},
|
|
|
[]rest.Route{
|
|
|
{
|
|
|
Method: http.MethodPost,
|
...
|
...
|
@@ -381,6 +396,8 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { |
|
|
)
|
|
|
|
|
|
server.AddRoutes(
|
|
|
rest.WithMiddlewares(
|
|
|
[]rest.Middleware{serverCtx.LogRequest},
|
|
|
[]rest.Route{
|
|
|
{
|
|
|
Method: http.MethodPost,
|
...
|
...
|
@@ -467,14 +484,15 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { |
|
|
Path: "/show/search_article",
|
|
|
Handler: article.MiniSearchArticlePageHandler(serverCtx),
|
|
|
},
|
|
|
},
|
|
|
}...,
|
|
|
),
|
|
|
rest.WithJwt(serverCtx.Config.MiniAuth.AccessSecret),
|
|
|
rest.WithPrefix("/v1/mini"),
|
|
|
)
|
|
|
|
|
|
server.AddRoutes(
|
|
|
rest.WithMiddlewares(
|
|
|
[]rest.Middleware{serverCtx.LoginStatusCheck},
|
|
|
[]rest.Middleware{serverCtx.LoginStatusCheck, serverCtx.LogRequest},
|
|
|
[]rest.Route{
|
|
|
{
|
|
|
Method: http.MethodGet,
|
...
|
...
|
@@ -519,7 +537,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { |
|
|
|
|
|
server.AddRoutes(
|
|
|
rest.WithMiddlewares(
|
|
|
[]rest.Middleware{serverCtx.LoginStatusCheck},
|
|
|
[]rest.Middleware{serverCtx.LoginStatusCheck, serverCtx.LogRequest},
|
|
|
[]rest.Route{
|
|
|
{
|
|
|
Method: http.MethodGet,
|
...
|
...
|
@@ -554,7 +572,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { |
|
|
|
|
|
server.AddRoutes(
|
|
|
rest.WithMiddlewares(
|
|
|
[]rest.Middleware{serverCtx.LoginStatusCheck},
|
|
|
[]rest.Middleware{serverCtx.LoginStatusCheck, serverCtx.LogRequest},
|
|
|
[]rest.Route{
|
|
|
{
|
|
|
Method: http.MethodPost,
|
...
|
...
|
|