website/api/routes/index.go
ngn 90af3d0500
All checks were successful
Build the docker image for the API / build (push) Successful in 2m6s
Build the docker image for the frontend application / build (push) Successful in 37s
update the app_url config option
Signed-off-by: ngn <ngn@ngn.tf>
2025-04-08 03:07:14 +03:00

15 lines
304 B
Go

package routes
import (
"github.com/gofiber/fiber/v2"
"github.com/ngn13/website/api/config"
)
func GET_Index(c *fiber.Ctx) error {
conf := c.Locals("config").(*config.Type)
app := conf.GetURL("app_url")
// redirect to the API documentation
return c.Redirect(app.JoinPath("/doc/api").String())
}