Fix wrong go types
This commit is contained in:
20
{{cookiecutter.project_name}}/internal/app/api/router.go
Normal file
20
{{cookiecutter.project_name}}/internal/app/api/router.go
Normal file
@ -0,0 +1,20 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/middleware/helmet"
|
||||
"{{cookiecutter.module_path}}/internal/app/api/v1"
|
||||
)
|
||||
|
||||
func ConfigureRoutes(app *fiber.App) error {
|
||||
api := app.Group("/api")
|
||||
|
||||
api.Use(helmet.New())
|
||||
|
||||
err := v1.ConfigureRoutes(api)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
15
{{cookiecutter.project_name}}/internal/app/api/v1/router.go
Normal file
15
{{cookiecutter.project_name}}/internal/app/api/v1/router.go
Normal file
@ -0,0 +1,15 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"github.com/gofiber/fiber/v2"
|
||||
)
|
||||
|
||||
func ConfigureRoutes(router fiber.Router) error {
|
||||
v1 := router.Group("/v1")
|
||||
|
||||
v1.Get("/ping", func(c *fiber.Ctx) error {
|
||||
return c.SendString("pong")
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
Reference in New Issue
Block a user