Fix wrong go types
This commit is contained in:
@ -3,11 +3,11 @@ package api
|
|||||||
import (
|
import (
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/gofiber/fiber/v2/middleware/helmet"
|
"github.com/gofiber/fiber/v2/middleware/helmet"
|
||||||
v1 "{{cookiecutter.module_path}}/internal/app/api/v1"
|
"{{cookiecutter.module_path}}/internal/app/api/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
func ConfigureRoutes(router *fiber.App) error {
|
func ConfigureRoutes(app *fiber.App) error {
|
||||||
api := router.Group("/api")
|
api := app.Group("/api")
|
||||||
|
|
||||||
api.Use(helmet.New())
|
api.Use(helmet.New())
|
||||||
|
|
@ -3,6 +3,7 @@ package app
|
|||||||
import (
|
import (
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/gofiber/fiber/v2/middleware/compress"
|
"github.com/gofiber/fiber/v2/middleware/compress"
|
||||||
|
"github.com/gofiber/fiber/v2/middleware/helmet"
|
||||||
"github.com/gofiber/fiber/v2/middleware/logger"
|
"github.com/gofiber/fiber/v2/middleware/logger"
|
||||||
"{{cookiecutter.module_path}}/internal/app/api"
|
"{{cookiecutter.module_path}}/internal/app/api"
|
||||||
)
|
)
|
||||||
@ -12,6 +13,7 @@ func Run() error {
|
|||||||
|
|
||||||
app.Use(logger.New())
|
app.Use(logger.New())
|
||||||
app.Use(compress.New())
|
app.Use(compress.New())
|
||||||
|
app.Use(helmet.New())
|
||||||
|
|
||||||
api.ConfigureRoutes(app)
|
api.ConfigureRoutes(app)
|
||||||
|
|
Reference in New Issue
Block a user