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