summaryrefslogtreecommitdiff
path: root/fig-web/src/Fig/Web/Module
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2025-12-17 05:09:45 -0500
committerLLLL Colonq <llll@colonq>2025-12-17 05:09:45 -0500
commite4b23e0478ff69998049de1792d5d56fb79a3d24 (patch)
treec243664fbac4471bf95c51bc46beb0a58b86b51e /fig-web/src/Fig/Web/Module
parentefdc8dc21571c3737662a9f49761961fe1068ead (diff)
Create directory
Diffstat (limited to 'fig-web/src/Fig/Web/Module')
-rw-r--r--fig-web/src/Fig/Web/Module/TCG.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/fig-web/src/Fig/Web/Module/TCG.hs b/fig-web/src/Fig/Web/Module/TCG.hs
index c322df5..da3504b 100644
--- a/fig-web/src/Fig/Web/Module/TCG.hs
+++ b/fig-web/src/Fig/Web/Module/TCG.hs
@@ -31,8 +31,10 @@ public a = do
status status404
respondText "card does not exist"
Just image -> do
+ liftIO $ Dir.createDirectoryIfMissing True cardDir
log $ "Deleting card from Redis: " <> uuid
liftIO $ BS.writeFile cardPath image
+ log $ "Deleting card from Redis: " <> uuid
DB.hdel a.db "tcg:cards" $ encodeUtf8 uuid
addHeader "Content-Type" "image/png"
respondBytes image