feat: add download savepoint route
This commit is contained in:
@@ -11,6 +11,18 @@ import (
|
||||
|
||||
func Init() {
|
||||
app := fiber.New()
|
||||
app.Use(func(c *fiber.Ctx) error {
|
||||
// Logic to execute before the next handler
|
||||
fmt.Printf("Request Method: %s, URL: %s\n", c.Method(), c.OriginalURL())
|
||||
|
||||
// Call the next handler in the stack
|
||||
err := c.Next()
|
||||
|
||||
// Logic to execute after the next handler
|
||||
fmt.Println("Request completed")
|
||||
|
||||
return err
|
||||
})
|
||||
config := huma.DefaultConfig("Go API", "1.0.0")
|
||||
config.Servers = []*huma.Server{{}}
|
||||
config.Components.SecuritySchemes = map[string]*huma.SecurityScheme{
|
||||
@@ -21,6 +33,12 @@ func Init() {
|
||||
},
|
||||
}
|
||||
api := humaFiber.New(app, config)
|
||||
api.UseMiddleware(
|
||||
func(ctx huma.Context, next func(huma.Context)) {
|
||||
ctx = huma.WithValue(ctx, "humaContext", ctx)
|
||||
next(ctx)
|
||||
},
|
||||
)
|
||||
|
||||
initRouter(api)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user