This commit is contained in:
2026-05-31 14:46:58 -04:00
parent dbc2026422
commit 518d62fcb6
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -131,4 +131,4 @@ fetchAllEntries conn =
SQL.query_
conn
"SELECT id, recipe_filename, cooked_date, comment, created_at \
\ FROM cook_log ORDER BY cooked_date DESC, id DESC"
\ FROM cook_log ORDER BY cooked_date ASC, id DESC"
+4 -3
View File
@@ -668,9 +668,10 @@ handleRequest recipeDir state db request respond = do
entries <- CookLog.fetchAllEntries db
let grouped = groupEntries entries
recipeTitleLookup fn =
case Map.lookup (map toLower (stripCookExt (T.unpack fn))) recipes of
Just info -> Idx.riTitle info
Nothing -> fn
maybe
fn
Idx.riTitle
(Map.lookup (map toLower (stripCookExt (T.unpack fn))) recipes)
respond $ htmlResponse (Html.cookHistoryPage recipeTitleLookup grouped)
-- Cook log JSON endpoint for all entries
["cook-log"] -> do