summaryrefslogtreecommitdiff
path: root/fig-frontend/src/Fig/Frontend
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2024-01-23 17:07:01 -0500
committerLLLL Colonq <llll@colonq>2024-01-23 17:07:01 -0500
commit4a7ab38bf416fc5eb6f7602cc97146f9b06ec627 (patch)
tree0c71b9c45894d049123c1a53e9f5ca13997a99f6 /fig-frontend/src/Fig/Frontend
parentf7cd8abb5eda335c7c2beb66fd28d594e3f3b956 (diff)
Add songs endpoint to API
Diffstat (limited to 'fig-frontend/src/Fig/Frontend')
-rw-r--r--fig-frontend/src/Fig/Frontend/DB.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/fig-frontend/src/Fig/Frontend/DB.hs b/fig-frontend/src/Fig/Frontend/DB.hs
index 0425f67..0ae8058 100644
--- a/fig-frontend/src/Fig/Frontend/DB.hs
+++ b/fig-frontend/src/Fig/Frontend/DB.hs
@@ -15,3 +15,7 @@ get :: MonadIO m => Redis.Connection -> ByteString -> m (Maybe ByteString)
get c key = liftIO $ Redis.runRedis c do
v <- Redis.get key
pure $ join $ hush v
+
+hvals :: MonadIO m => Redis.Connection -> ByteString -> m (Maybe [ByteString])
+hvals c key = liftIO $ Redis.runRedis c do
+ hush <$> Redis.hvals key