diff options
Diffstat (limited to 'handlers/shopping_list.go')
| -rw-r--r-- | handlers/shopping_list.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/handlers/shopping_list.go b/handlers/shopping_list.go index a1b90ff..57b3d1e 100644 --- a/handlers/shopping_list.go +++ b/handlers/shopping_list.go @@ -103,6 +103,7 @@ func DeleteEntries(c *gin.Context) { func ToggleEntry(c *gin.Context) { id := c.PostForm("id") + checked := c.PostForm("checked") any_list, ok := c.Get("current_list") if !ok { @@ -128,7 +129,7 @@ func ToggleEntry(c *gin.Context) { return } - entry.Checked = !entry.Checked + entry.Checked = checked[0] == 'f' err = models.DB. Save(&entry). Error |