package web

import (
	"github.com/gofiber/fiber/v2"
	"proxy-server/gateway/env"
	"proxy-server/gateway/web/handlers"
)

func Router(r *fiber.App) {
	var api = r.Group("/api")
	api.Post("/permit", handlers.Permit)

	if env.RunMode == "dev" {
		var debug = r.Group("/debug")
		debug.Get("/info", handlers.Info)
		debug.Get("/consuming/list", handlers.GetConsuming)
		debug.Get("/consuming/reset", handlers.RestConsuming)
	}
}
