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
Build and Deploy / build-and-deploy (push) Failing after 21s
This commit is contained in:
+7
-1
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user