added modify command for upload and form

This commit is contained in:
2023-03-31 14:21:34 +02:00
parent b916fa8fb6
commit 5ec23ce9fd
8 changed files with 225 additions and 6 deletions

View File

@@ -76,6 +76,11 @@ func Runserver(conf *cfg.Config, args []string) error {
return UploadDescribe(c, conf, db)
})
// modify
api.Put("/uploads/:id", auth, func(c *fiber.Ctx) error {
return UploadModify(c, conf, db)
})
// download w/o expire
api.Get("/uploads/:id/file", auth, func(c *fiber.Ctx) error {
return UploadFetch(c, conf, db)
@@ -101,6 +106,11 @@ func Runserver(conf *cfg.Config, args []string) error {
api.Get("/forms/:id", auth, func(c *fiber.Ctx) error {
return FormDescribe(c, conf, db)
})
// modify
api.Put("/forms/:id", auth, func(c *fiber.Ctx) error {
return FormModify(c, conf, db)
})
}
// public routes