aboutsummaryrefslogtreecommitdiff
path: root/modules/lists
diff options
context:
space:
mode:
authorrtz12 <koenig@fagott.pw>2016-11-08 00:43:00 (UTC)
committerrtz12 <koenig@fagott.pw>2016-11-08 00:43:00 (UTC)
commitc5517076f492e878a21123ae4bcb927f25bbc0a2 (patch)
tree9b88921d88484a21aec949c23bbfb805ef35f997 /modules/lists
parent2492936d542e3c2578ca4d06c9f3f59238fb2eb4 (diff)
Fick dich Keiser
Diffstat (limited to 'modules/lists')
-rw-r--r--modules/lists/lists.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/lists/lists.go b/modules/lists/lists.go
index d411209..be6e399 100644
--- a/modules/lists/lists.go
+++ b/modules/lists/lists.go
@@ -701,14 +701,13 @@ func (m *Module) removeGrilFromList(w http.ResponseWriter, r *http.Request, p ht
701 http.Error(w, "could not remove gril", 500) 701 http.Error(w, "could not remove gril", 500)
702 return 702 return
703 } 703 }
704 704
705 _, err := m.g.DB.Exec(`UPDATE grilist.lists_grils SET "order" = "order" - 1 WHERE list_id = $1 AND "order" > $2`, listID, oldOrder) 705 _, err = m.g.DB.Exec(`UPDATE grilist.lists_grils SET "order" = "order" - 1 WHERE list_id = $1 AND "order" > $2`, listID, oldOrder)
706 if err != nil { 706 if err != nil {
707 log.Println("error removing gril:", err) 707 log.Println("error removing gril:", err)
708 http.Error(w, "could not remove gril", 500) 708 http.Error(w, "could not remove gril", 500)
709 return 709 return
710 } 710 }
711
712 711
713 list.Grils = list.Grils[:0] 712 list.Grils = list.Grils[:0]
714 713