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

@@ -37,8 +37,7 @@ type (
)
@server (
middleware: SuperAdminAuthMiddleware
prefix: /api/blog
prefix: /api/blog
)
service Blog {
@doc (
@@ -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"

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