We have delete now. Last thing is insert.
This commit is contained in:
parent
504433502a
commit
ea3b59129f
2 changed files with 21 additions and 2 deletions
|
@ -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{})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue