From 81ca02948bf357f98bede859e45d5e5cd975ec24 Mon Sep 17 00:00:00 2001 From: Stuce Date: Wed, 25 Jun 2025 17:03:00 +0100 Subject: [PATCH] qol improvements --- config/routes.yesodroutes | 3 ++ src/Handler/TodoEntry.hs | 77 +++++++++++++++++++++++++++------------ 2 files changed, 56 insertions(+), 24 deletions(-) diff --git a/config/routes.yesodroutes b/config/routes.yesodroutes index 9413671..86f2549 100644 --- a/config/routes.yesodroutes +++ b/config/routes.yesodroutes @@ -16,8 +16,11 @@ /check/group/#GroupId/todolist/#TodolistId/#TodolistItemId CheckTodolistItemR POST /edit/group/#GroupId/todolist/#TodolistId EditTodolistItemsR GET POST +/sort/group/#GroupId/todolist/#TodolistId SortTodolistItemsR POST +/trim/group/#GroupId/todolist/#TodolistId TrimTodolistItemsR POST /edit/group/#GroupId EditTodolistR GET POST +/adduser/group/#GroupId AddUserR POST /edit EditGroupR GET POST /delete DeleteGroupR POST diff --git a/src/Handler/TodoEntry.hs b/src/Handler/TodoEntry.hs index b49ac60..11f7fb2 100644 --- a/src/Handler/TodoEntry.hs +++ b/src/Handler/TodoEntry.hs @@ -12,6 +12,7 @@ module Handler.TodoEntry where import Import import Text.Read import Database.Persist.Sql (rawExecute, fromSqlKey, toSqlKey) +import GHC.RTS.Flags (TraceFlags(user)) -- TODO: move this back to another handler getHomeR :: Handler Html getHomeR = do @@ -71,12 +72,21 @@ getTodolistR groupId = do $maybe token <- mToken