First table is working
This commit is contained in:
+15
-1
@@ -115,7 +115,7 @@ func routes(h handler.Service, r fiber.Router) {
|
||||
query := c.Query("q", "")
|
||||
|
||||
c.Type("html")
|
||||
return h.HandleQueryAppunti(c, query, CreateContext(c))
|
||||
return h.HandleAppuntiPage(c, query, CreateContext(c))
|
||||
})
|
||||
|
||||
r.Get("/appunti/condivisi", func(c *fiber.Ctx) error {
|
||||
@@ -222,4 +222,18 @@ func routesApi(h handler.Service, r fiber.Router) {
|
||||
|
||||
return c.JSON(user)
|
||||
})
|
||||
|
||||
r.Post("/appunti", func(c *fiber.Ctx) error {
|
||||
var dispensaTemplate model.Dispensa
|
||||
if err := c.BodyParser(&dispensaTemplate); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
dispensa, err := h.HandleCreateDispensa(dispensaTemplate, CreateContext(c))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return c.JSON(dispensa)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user