From a8036ceb91c1e1f5ea74f8cf23666e892f9cd051 Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Tue, 23 Jan 2024 18:07:19 -0500 Subject: Add get song notes endpoint --- fig-frontend/src/Fig/Frontend/DB.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'fig-frontend/src/Fig/Frontend/DB.hs') diff --git a/fig-frontend/src/Fig/Frontend/DB.hs b/fig-frontend/src/Fig/Frontend/DB.hs index 0ae8058..d0641de 100644 --- a/fig-frontend/src/Fig/Frontend/DB.hs +++ b/fig-frontend/src/Fig/Frontend/DB.hs @@ -14,7 +14,12 @@ connect = liftIO $ Redis.checkedConnect Redis.defaultConnectInfo 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 + pure . join $ hush v + +hget :: MonadIO m => Redis.Connection -> ByteString -> ByteString -> m (Maybe ByteString) +hget c key hkey = liftIO $ Redis.runRedis c do + v <- Redis.hget key hkey + pure . join $ hush v hvals :: MonadIO m => Redis.Connection -> ByteString -> m (Maybe [ByteString]) hvals c key = liftIO $ Redis.runRedis c do -- cgit v1.2.3