mirror of
https://github.com/nprasad2077/NBA_Go.git
synced 2026-09-22 14:05:13 +00:00
swagger redirect root
This commit is contained in:
@@ -91,6 +91,11 @@ func main() {
|
|||||||
db := config.InitDB(false)
|
db := config.InitDB(false)
|
||||||
|
|
||||||
/* ---------- PUBLIC ROUTES (no API key) ---------- */
|
/* ---------- PUBLIC ROUTES (no API key) ---------- */
|
||||||
|
// Redirect root to swagger docs
|
||||||
|
app.Get("/", func(c *fiber.Ctx) error {
|
||||||
|
return c.Redirect("/swagger/index.html")
|
||||||
|
})
|
||||||
|
|
||||||
app.Get("/metrics", adaptor.HTTPHandler(promhttp.Handler()))
|
app.Get("/metrics", adaptor.HTTPHandler(promhttp.Handler()))
|
||||||
app.Get("/swagger/*", fiberswagger.WrapHandler)
|
app.Get("/swagger/*", fiberswagger.WrapHandler)
|
||||||
controllers.RegisterKeyAdminRoutes(app, db)
|
controllers.RegisterKeyAdminRoutes(app, db)
|
||||||
|
|||||||
Reference in New Issue
Block a user