Gestion des utilisateurs
This commit is contained in:
parent
7d71923d4f
commit
efd8912648
14 changed files with 576 additions and 26 deletions
|
|
@ -45,7 +45,7 @@ func ListShow(c *fiber.Ctx) error {
|
|||
}
|
||||
|
||||
if result.Error != nil {
|
||||
return err
|
||||
return result.Error
|
||||
}
|
||||
|
||||
title := fmt.Sprintf(
|
||||
|
|
@ -122,7 +122,7 @@ func ListEdit(c *fiber.Ctx) error {
|
|||
}
|
||||
|
||||
if result.Error != nil {
|
||||
return err
|
||||
return result.Error
|
||||
}
|
||||
|
||||
title := fmt.Sprintf(
|
||||
|
|
@ -191,7 +191,7 @@ func ListDelete(c *fiber.Ctx) error {
|
|||
|
||||
result := db.Delete(&models.List{}, id)
|
||||
if result.Error != nil {
|
||||
return err
|
||||
return result.Error
|
||||
}
|
||||
|
||||
return c.Redirect("/admin/lists")
|
||||
|
|
@ -213,7 +213,7 @@ func ListItemAdd(c *fiber.Ctx) error {
|
|||
}
|
||||
|
||||
if result.Error != nil {
|
||||
return err
|
||||
return result.Error
|
||||
}
|
||||
|
||||
title := fmt.Sprintf(
|
||||
|
|
@ -285,7 +285,7 @@ func ListItemEdit(c *fiber.Ctx) error {
|
|||
}
|
||||
|
||||
if result.Error != nil {
|
||||
return err
|
||||
return result.Error
|
||||
}
|
||||
|
||||
var listItem models.ListItem
|
||||
|
|
@ -296,7 +296,7 @@ func ListItemEdit(c *fiber.Ctx) error {
|
|||
}
|
||||
|
||||
if result2.Error != nil {
|
||||
return err
|
||||
return result2.Error
|
||||
}
|
||||
|
||||
title := fmt.Sprintf(
|
||||
|
|
@ -364,12 +364,12 @@ func ListItemDelete(c *fiber.Ctx) error {
|
|||
}
|
||||
|
||||
if result.Error != nil {
|
||||
return err
|
||||
return result.Error
|
||||
}
|
||||
|
||||
result2 := db.Delete(&models.ListItem{}, itemid)
|
||||
if result2.Error != nil {
|
||||
return err
|
||||
return result2.Error
|
||||
}
|
||||
|
||||
return c.Redirect(fmt.Sprintf(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue