aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/lists/lists.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/lists/lists.go b/modules/lists/lists.go
index b77120e..8957c5f 100644
--- a/modules/lists/lists.go
+++ b/modules/lists/lists.go
@@ -66,7 +66,7 @@ func (m *Module) Init(g *grilist.Grilist) {
66} 66}
67 67
68func (m *Module) getListGrils(list *List) error { 68func (m *Module) getListGrils(list *List) error {
69 rows, err := m.g.DB.Query(`SELECT gril_id, "order" FROM grilist.lists_grils WHERE list_id = $1`, list.ID) 69 rows, err := m.g.DB.Query(`SELECT gril_id, "order" FROM grilist.lists_grils WHERE list_id = $1 ORDER BY "order" ASC`, list.ID)
70 if err != nil { 70 if err != nil {
71 return err 71 return err
72 } 72 }
@@ -268,10 +268,10 @@ func (m *Module) displayCreateList(w http.ResponseWriter, r *http.Request, p htt
268 http.Redirect(w, r, "/", 302) 268 http.Redirect(w, r, "/", 302)
269 return 269 return
270 } 270 }
271 271
272 data := m.g.Renderer.DefaultData() 272 data := m.g.Renderer.DefaultData()
273 data["user"] = user 273 data["user"] = user
274 274
275 m.g.Renderer.RenderPage("create_list", w, data) 275 m.g.Renderer.RenderPage("create_list", w, data)
276} 276}
277 277
@@ -282,7 +282,7 @@ func (m *Module) createList(w http.ResponseWriter, r *http.Request, p httprouter
282 http.Error(w, "500", http.StatusInternalServerError) 282 http.Error(w, "500", http.StatusInternalServerError)
283 return 283 return
284 } 284 }
285 285
286 values, err := readBody(r) 286 values, err := readBody(r)
287 if err != nil { 287 if err != nil {
288 log.Println(err) 288 log.Println(err)
@@ -297,7 +297,7 @@ func (m *Module) createList(w http.ResponseWriter, r *http.Request, p httprouter
297 http.Error(w, "500", http.StatusInternalServerError) 297 http.Error(w, "500", http.StatusInternalServerError)
298 return 298 return
299 } 299 }
300 300
301 http.Redirect(w, r, fmt.Sprintf("/list/%d", id), 302) 301 http.Redirect(w, r, fmt.Sprintf("/list/%d", id), 302)
302} 302}
303 303