fix: use Text for created_at, fix show-bug in ToJSON, add /cook-history route
Build and Deploy / build-and-deploy (push) Failing after 21s

This commit is contained in:
2026-05-25 22:10:23 -04:00
parent 90971568a3
commit 0b6b9c3d17
4 changed files with 22 additions and 13 deletions
+7 -1
View File
@@ -649,10 +649,16 @@ handleRequest state db request respond = do
[("Content-Type", "application/json")]
body
-- Cook history page (all entries across recipes)
["cook-log"] -> do
["cook-history"] -> do
entries <- CookLog.fetchAllEntries db
let grouped = groupEntries entries
respond $ htmlResponse (Html.cookHistoryPage grouped)
-- Cook log JSON endpoint for all entries
["cook-log"] -> do
entries <- CookLog.fetchAllEntries db
respond $ Wai.responseLBS HTTP.status200
[("Content-Type", "application/json")]
(A.encode entries)
_ -> respond notFound
-- | Handle POST /cook-log/{filename}