mirror of
https://codeberg.org/scip/anydb.git
synced 2025-12-17 12:31:02 +01:00
fixed crash in api list, added filter support to api list
This commit is contained in:
@@ -42,6 +42,11 @@ func Runserver(conf *cfg.Config, args []string) error {
|
||||
return RestList(c, conf)
|
||||
})
|
||||
|
||||
api.Post("/", func(c *fiber.Ctx) error {
|
||||
// same thing as above but allows to supply parameters, see app.Dbattr{}
|
||||
return RestList(c, conf)
|
||||
})
|
||||
|
||||
api.Get("/:key", func(c *fiber.Ctx) error {
|
||||
return RestGet(c, conf)
|
||||
})
|
||||
@@ -78,7 +83,7 @@ func SetupServer(conf *cfg.Config) *fiber.App {
|
||||
})
|
||||
|
||||
router.Use(logger.New(logger.Config{
|
||||
Format: "${pid} ${ip}:${port} ${status} - ${method} ${path}\n",
|
||||
Format: "${pid} ${ip}:${port} ${status} - ${method} ${path}\n",
|
||||
DisableColors: true,
|
||||
}))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user