Order tasks by change date first
All checks were successful
Alpine 3.20 Success

The user presumably does not want to look everywhere for recent tasks.
This commit is contained in:
Přemysl Eric Janouch 2024-12-26 16:24:46 +01:00
parent 55a6693942
commit 4f2c2dc8da
Signed by: p
GPG Key ID: A0420B94F92B9493

View File

@ -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(),