Formatting
Build and Deploy / build-and-deploy (push) Successful in 14m49s

This commit is contained in:
2026-05-26 07:25:18 -04:00
parent d22c8a79d4
commit 6a7374c912
2 changed files with 10 additions and 8 deletions
+5 -3
View File
@@ -105,11 +105,13 @@ insertEntry conn filename day mComment = do
fromMaybe d Nothing = d
fromMaybe _ (Just x) = x
-- | Fetch all entries for a given recipe, newest first.
-- Tries both the normalized key and with @.cook@ appended (for legacy entries).
{- | Fetch all entries for a given recipe, newest first.
Tries both the normalized key and with @.cook@ appended (for legacy entries).
-}
fetchEntries :: Connection -> Text -> IO [CookEntry]
fetchEntries conn filename = do
entries <- SQL.query
entries <-
SQL.query
conn
"SELECT id, recipe_filename, cooked_date, comment, created_at \
\ FROM cook_log WHERE recipe_filename = ? ORDER BY cooked_date DESC, id DESC"
+1 -1
View File
@@ -21,9 +21,9 @@ import qualified Data.ByteString.Lazy as LB
import Data.Char (digitToInt, isAlphaNum, toLower)
import Data.IORef (IORef, atomicModifyIORef', newIORef, readIORef, writeIORef)
import Data.List (isSuffixOf, sortOn)
import Data.Ord (Down (Down))
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import Data.Ord (Down (Down))
import Data.Text (Text)
import qualified Data.Text as T
import Data.Text.Encoding (encodeUtf8)