refactor: rename Hermes API to Admin API v2 under /api/v2
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>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
f8d44f3c21
commit
9fd0772e91
@@ -6,11 +6,11 @@ import (
|
||||
"github.com/sujit-baniya/fiber-boilerplate/rest/middlewares"
|
||||
)
|
||||
|
||||
func HermesRoutes(app *fiber.App) {
|
||||
h := app.Group("/hermes", middlewares.HermesAuth())
|
||||
func AdminApiRoutes(api fiber.Router) {
|
||||
h := api.Group("v2", middlewares.AdminApiAuth())
|
||||
|
||||
// ─── Spec (documentación completa de la API) ─────────────────────────────
|
||||
h.Get("/spec", controllers.HermesSpec)
|
||||
h.Get("/spec", controllers.AdminApiSpec)
|
||||
|
||||
// ─── Usuarios ────────────────────────────────────────────────────────────
|
||||
h.Get("/users", controllers.GetUsers)
|
||||
|
||||
@@ -9,9 +9,7 @@ func LoadRoutes(app *fiber.App) {
|
||||
// Grupo de rutas de la API con autenticación
|
||||
api := app.Group("/api").Use(middlewares.AuthApi())
|
||||
ApiRoutes(api)
|
||||
|
||||
// API Hermes (acceso externo con API Key)
|
||||
HermesRoutes(app)
|
||||
AdminApiRoutes(api)
|
||||
|
||||
// Grupo de rutas web (sin autenticación)
|
||||
web := app.Group("")
|
||||
|
||||
Reference in New Issue
Block a user