summaryrefslogtreecommitdiff
path: root/fig-web/src/Fig
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2026-04-14 02:03:08 -0400
committerLLLL Colonq <llll@colonq>2026-04-14 02:03:28 -0400
commit7a07562c61091178e540803a8c70ce5d088c5dfa (patch)
tree878e88d1ec713db9a05cee344efddab07476f1f9 /fig-web/src/Fig
parent3f9a8e0055caf350b07f31e3f99351590f774944 (diff)
Get all cards by userid
Diffstat (limited to 'fig-web/src/Fig')
-rw-r--r--fig-web/src/Fig/Web/Module/TCG.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/fig-web/src/Fig/Web/Module/TCG.hs b/fig-web/src/Fig/Web/Module/TCG.hs
index 4f7c094..d6b68fd 100644
--- a/fig-web/src/Fig/Web/Module/TCG.hs
+++ b/fig-web/src/Fig/Web/Module/TCG.hs
@@ -50,3 +50,7 @@ public a = do
body_ do
forM_ cards $ \c -> do
img_ [src_ $ mconcat ["/api/tcg/card/", decodeUtf8 c, ".png"]]
+ onGet "/api/tcg/cards/:userid" do
+ userid <- pathParam "userid"
+ cards <- DB.run a.db (DB.lrange ("tcg-inventory:" <> userid) 0 (-1))
+ respondText . Text.unlines $ decodeUtf8 <$> cards