summaryrefslogtreecommitdiff
path: root/fig-web/src/Fig/Web/Module/TCG.hs
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2026-02-24 14:25:57 -0500
committerLLLL Colonq <llll@colonq>2026-02-24 14:25:57 -0500
commit3eae057004597db4d41cdcc3770d5c7e22c50d15 (patch)
tree4997306631687de729ebae5cbf71765dc3c1df67 /fig-web/src/Fig/Web/Module/TCG.hs
parent91e9ebf92981341668a0a289cf9710546420e993 (diff)
Update
Diffstat (limited to 'fig-web/src/Fig/Web/Module/TCG.hs')
-rw-r--r--fig-web/src/Fig/Web/Module/TCG.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/fig-web/src/Fig/Web/Module/TCG.hs b/fig-web/src/Fig/Web/Module/TCG.hs
index 274fd4b..e57cb28 100644
--- a/fig-web/src/Fig/Web/Module/TCG.hs
+++ b/fig-web/src/Fig/Web/Module/TCG.hs
@@ -26,7 +26,7 @@ public a = do
-- liftIO $ Dir.createDirectoryIfMissing True cardDir
let cardPath = cardDir <> unpack uuid <> ".png"
liftIO (Dir.doesFileExist cardPath) >>= \case
- False -> DB.hget a.db "tcg:cards" (encodeUtf8 uuid) >>= \case
+ False -> DB.run a.db (DB.hget "tcg:cards" $ encodeUtf8 uuid) >>= \case
Nothing -> do
status status404
respondText "card does not exist"
@@ -34,7 +34,7 @@ public a = do
liftIO $ Dir.createDirectoryIfMissing True cardDir
liftIO $ BS.writeFile cardPath image
log $ "Deleting card from Redis: " <> uuid
- DB.hdel a.db "tcg:cards" $ encodeUtf8 uuid
+ DB.run a.db $ DB.hdel "tcg:cards" $ encodeUtf8 uuid
addHeader "Content-Type" "image/png"
respondBytes image
True -> do
@@ -43,7 +43,7 @@ public a = do
respondBytes image
onGet "/api/tcg/binder/:userid" do
userid <- pathParam "userid"
- cards <- take 20 <$> DB.lrange a.db ("tcg-inventory:" <> userid) 0 (-1)
+ cards <- take 20 <$> DB.run a.db (DB.lrange ("tcg-inventory:" <> userid) 0 (-1))
respondHTML do
head_ do
title_ "LCOLONQ: The Game"