HLint
This commit is contained in:
+1
-1
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user