We have delete now. Last thing is insert.

This commit is contained in:
Zed A. Shaw 2025-07-27 02:38:08 -04:00
parent 504433502a
commit ea3b59129f
2 changed files with 21 additions and 2 deletions

View file

@ -76,6 +76,14 @@ func PutApiInsert(c *fiber.Ctx) error {
}
func DeleteApi(c *fiber.Ctx) error {
table := c.Params("table")
id, err := strconv.ParseInt(c.Params("id"), 10, 64)
if err != nil { return IfErrNil(err, c) }
err = Delete(table, id)
if err != nil { return IfErrNil(err, c) }
return c.JSON(fiber.Map{})
}