aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2024-12-26 16:24:46 +0100
committerPřemysl Eric Janouch <p@janouch.name>2024-12-26 16:24:54 +0100
commit4f2c2dc8daeb5474fbfc4bd6071987b2797f5eba (patch)
treebc518da923e662cae8fc278a06c1f037b01ece6a
parent55a66939426b8d395d67af1815fb137148b88c1c (diff)
downloadacid-4f2c2dc8daeb5474fbfc4bd6071987b2797f5eba.tar.gz
acid-4f2c2dc8daeb5474fbfc4bd6071987b2797f5eba.tar.xz
acid-4f2c2dc8daeb5474fbfc4bd6071987b2797f5eba.zip
Order tasks by change date first
The user presumably does not want to look everywhere for recent tasks.
-rw-r--r--acid.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/acid.go b/acid.go
index 350c9d8..cdf9007 100644
--- a/acid.go
+++ b/acid.go
@@ -244,7 +244,7 @@ var templateTasks = template.Must(template.New("tasks").Parse(`
`))
func handleTasks(w http.ResponseWriter, r *http.Request) {
- tasks, err := getTasks(r.Context(), `ORDER BY id DESC`)
+ tasks, err := getTasks(r.Context(), `ORDER BY changed DESC, id DESC`)
if err != nil {
http.Error(w,
"Error retrieving tasks: "+err.Error(),