update
All checks were successful
CI - Build and Push / Build and Push Docker Image (push) Successful in 1m10s
All checks were successful
CI - Build and Push / Build and Push Docker Image (push) Successful in 1m10s
This commit is contained in:
@@ -37,7 +37,6 @@ type (
|
||||
)
|
||||
|
||||
@server (
|
||||
middleware: SuperAdminAuthMiddleware
|
||||
prefix: /api/blog
|
||||
)
|
||||
service Blog {
|
||||
@@ -47,7 +46,13 @@ service Blog {
|
||||
)
|
||||
@handler pingHandler
|
||||
get /ping (PingReq) returns (PingResp)
|
||||
}
|
||||
|
||||
@server (
|
||||
middleware: SuperAdminAuthMiddleware
|
||||
prefix: /api/blog
|
||||
)
|
||||
service Blog {
|
||||
@doc (
|
||||
summary: "Get presigned URL for file upload"
|
||||
description: "Get presigned URL for file upload"
|
||||
|
||||
@@ -12,6 +12,18 @@ import (
|
||||
)
|
||||
|
||||
func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
server.AddRoutes(
|
||||
[]rest.Route{
|
||||
{
|
||||
// Ping the server to check if it's alive
|
||||
Method: http.MethodGet,
|
||||
Path: "/ping",
|
||||
Handler: pingHandler(serverCtx),
|
||||
},
|
||||
},
|
||||
rest.WithPrefix("/api/blog"),
|
||||
)
|
||||
|
||||
server.AddRoutes(
|
||||
rest.WithMiddlewares(
|
||||
[]rest.Middleware{serverCtx.SuperAdminAuthMiddleware},
|
||||
@@ -28,12 +40,6 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
Path: "/file/upload",
|
||||
Handler: UploadPresignedURLHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
// Ping the server to check if it's alive
|
||||
Method: http.MethodGet,
|
||||
Path: "/ping",
|
||||
Handler: pingHandler(serverCtx),
|
||||
},
|
||||
}...,
|
||||
),
|
||||
rest.WithPrefix("/api/blog"),
|
||||
|
||||
Reference in New Issue
Block a user