From 3eae057004597db4d41cdcc3770d5c7e22c50d15 Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Tue, 24 Feb 2026 14:25:57 -0500 Subject: Update --- fig-web/src/Fig/Web/Module/Sentiment.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fig-web/src/Fig/Web/Module/Sentiment.hs') diff --git a/fig-web/src/Fig/Web/Module/Sentiment.hs b/fig-web/src/Fig/Web/Module/Sentiment.hs index 6b99873..41f90f3 100644 --- a/fig-web/src/Fig/Web/Module/Sentiment.hs +++ b/fig-web/src/Fig/Web/Module/Sentiment.hs @@ -11,11 +11,11 @@ import qualified Fig.Web.DB as DB public :: PublicModule public a = do onGet "/api/sentiment" do - s <- DB.get a.db "sentiment" >>= \case + s <- DB.run a.db (DB.get "sentiment") >>= \case Nothing -> pure "0" Just x -> pure x respondText $ decodeUtf8 s onPost "/api/sentiment/green" do - DB.incr a.db "sentiment" + DB.run a.db $ DB.incr "sentiment" onPost "/api/sentiment/red" do - DB.decr a.db "sentiment" + DB.run a.db $ DB.decr "sentiment" -- cgit v1.2.3