|
|
|
@ -79,19 +79,19 @@ func Configure(l *sl.ServiceLocator) (*devService, error) {
|
|
|
|
|
map[string]Handler{},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
api, err := sl.Use(l, routes.Api)
|
|
|
|
|
r, err := sl.Use(l, routes.Root)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
api.Get("/development/routes", func(c *fiber.Ctx) error {
|
|
|
|
|
r.Get("/api/development/routes", func(c *fiber.Ctx) error {
|
|
|
|
|
return c.JSON(map[string]any{
|
|
|
|
|
"static": d.staticRoutes,
|
|
|
|
|
"dynamic": d.dynamicRoutes,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
api.Post("/development/render", func(c *fiber.Ctx) error {
|
|
|
|
|
r.Post("/api/development/render", func(c *fiber.Ctx) error {
|
|
|
|
|
var data struct {
|
|
|
|
|
Route string `json:"route"`
|
|
|
|
|
Page string `json:"page"`
|
|
|
|
|