add route to get if the resourced is enabled
This commit is contained in:
parent
b1981db998
commit
77970e86e7
|
@ -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")
|
||||||
|
|
Loading…
Reference in New Issue