aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkeiser <keiserwiliem@googlemail.com>2016-11-04 17:08:21 (UTC)
committerkeiser <keiserwiliem@googlemail.com>2016-11-04 17:08:21 (UTC)
commita15373b597597f2986e585112a66fa366941f701 (patch)
treedfab65dfed988c9813a49e89ffc9c8507b1c4b87
parentb37847a030c792697902466274080ed095600008 (diff)
Ich bin auch auch doof
-rw-r--r--modules/lists/lists.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/lists/lists.go b/modules/lists/lists.go
index ad3bd0e..722d773 100644
--- a/modules/lists/lists.go
+++ b/modules/lists/lists.go
@@ -695,7 +695,7 @@ func (m *Module) removeGrilFromList(w http.ResponseWriter, r *http.Request, p ht
695 return 695 return
696 } 696 }
697 697
698 res, err := m.g.DB.QueryRow(`DELETE FROM grilist.lists_grils WHERE list_id=$1 AND gril_id=$2`, listID, grilID).scan(&oldOrder) 698 res, err := m.g.DB.QueryRow(`DELETE FROM grilist.lists_grils WHERE list_id=$1 AND gril_id=$2`, listID, grilID).Scan(&oldOrder)
699 if err != nil { 699 if err != nil {
700 log.Println("error removing gril:", err) 700 log.Println("error removing gril:", err)
701 http.Error(w, "could not remove gril", 500) 701 http.Error(w, "could not remove gril", 500)
@@ -708,7 +708,7 @@ func (m *Module) removeGrilFromList(w http.ResponseWriter, r *http.Request, p ht
708 return 708 return
709 } 709 }
710 710
711 res, err := m.g.DB.Exec(`UPDATE grilist.lists_gril SET "order" = "order" - 1 WHERE list_id = $1 AND "order" > $2`, listID, oldOrder) 711 res, err = m.g.DB.Exec(`UPDATE grilist.lists_gril SET "order" = "order" - 1 WHERE list_id = $1 AND "order" > $2`, listID, oldOrder)
712 if err != nil { 712 if err != nil {
713 log.Println("error removing gril:", err) 713 log.Println("error removing gril:", err)
714 http.Error(w, "could not remove gril", 500) 714 http.Error(w, "could not remove gril", 500)