Add resource service #19

Merged
blek merged 13 commits from resource-service into 0.2-dev 2023-11-11 09:09:48 +01:00
1 changed files with 4 additions and 0 deletions
Showing only changes of commit 855ac150ef - Show all commits

View File

@ -95,6 +95,10 @@ func main() {
AppName: "blek! File resourceD", AppName: "blek! File resourceD",
}) })
app.Get("/info/is_enabled", func (c *fiber.Ctx) error {
return c.JSON(conf.ResourceD.Enabled)
})
app.Use(func (c *fiber.Ctx) error { app.Use(func (c *fiber.Ctx) error {
if ! conf.ResourceD.Enabled { if ! conf.ResourceD.Enabled {
return c.Status(fiber.StatusNotFound).SendString("ResourceD is disabled") return c.Status(fiber.StatusNotFound).SendString("ResourceD is disabled")