Integrates the external API into the existing /api group as v2 with API key auth (ADMIN_API_KEY), replacing the separate /hermes namespace. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
20 lines
407 B
Go
Executable File
20 lines
407 B
Go
Executable File
package routes
|
|
|
|
import (
|
|
"github.com/gofiber/fiber/v2"
|
|
"github.com/sujit-baniya/fiber-boilerplate/rest/middlewares"
|
|
)
|
|
|
|
func LoadRoutes(app *fiber.App) {
|
|
// Grupo de rutas de la API con autenticación
|
|
api := app.Group("/api").Use(middlewares.AuthApi())
|
|
ApiRoutes(api)
|
|
AdminApiRoutes(api)
|
|
|
|
// Grupo de rutas web (sin autenticación)
|
|
web := app.Group("")
|
|
|
|
// Rutas del backend (web)
|
|
WebRoutes(web)
|
|
}
|