website/api/routes/index.go
ngn 05185cb82a
use the ortam config library in the API
Signed-off-by: ngn <ngn@ngn.tf>
2025-04-13 01:06:37 +03:00

14 lines
281 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)
// redirect to the API documentation
return c.Redirect(conf.AppUrl.JoinPath("/doc/api").String())
}