update
All checks were successful
CI - Build and Push / Build and Push Docker Image (push) Successful in 1m10s

This commit is contained in:
2025-10-25 09:36:58 +08:00
parent 512db143fc
commit 166382ffa8
2 changed files with 19 additions and 8 deletions

View File

@@ -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"),