HLint
This commit is contained in:
+1
-1
@@ -131,4 +131,4 @@ fetchAllEntries conn =
|
|||||||
SQL.query_
|
SQL.query_
|
||||||
conn
|
conn
|
||||||
"SELECT id, recipe_filename, cooked_date, comment, created_at \
|
"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
@@ -668,9 +668,10 @@ handleRequest recipeDir state db request respond = do
|
|||||||
entries <- CookLog.fetchAllEntries db
|
entries <- CookLog.fetchAllEntries db
|
||||||
let grouped = groupEntries entries
|
let grouped = groupEntries entries
|
||||||
recipeTitleLookup fn =
|
recipeTitleLookup fn =
|
||||||
case Map.lookup (map toLower (stripCookExt (T.unpack fn))) recipes of
|
maybe
|
||||||
Just info -> Idx.riTitle info
|
fn
|
||||||
Nothing -> fn
|
Idx.riTitle
|
||||||
|
(Map.lookup (map toLower (stripCookExt (T.unpack fn))) recipes)
|
||||||
respond $ htmlResponse (Html.cookHistoryPage recipeTitleLookup grouped)
|
respond $ htmlResponse (Html.cookHistoryPage recipeTitleLookup grouped)
|
||||||
-- Cook log JSON endpoint for all entries
|
-- Cook log JSON endpoint for all entries
|
||||||
["cook-log"] -> do
|
["cook-log"] -> do
|
||||||
|
|||||||
Reference in New Issue
Block a user