Fix wrong go types

This commit is contained in:
2023-07-22 14:28:49 +02:00
parent f36146731b
commit d113f02d90
3 changed files with 5 additions and 3 deletions

View File

@ -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())

View File

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