From a55a65a2da8e0d0a8350d9e672a5beaa013bd7b1 Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Tue, 7 Jan 2025 22:53:01 -0500 Subject: Add initial exchange --- fig-web/src/Fig/Web.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'fig-web/src/Fig/Web.hs') diff --git a/fig-web/src/Fig/Web.hs b/fig-web/src/Fig/Web.hs index e200cf6..b08a032 100644 --- a/fig-web/src/Fig/Web.hs +++ b/fig-web/src/Fig/Web.hs @@ -31,6 +31,7 @@ import Fig.Web.Auth import Fig.Web.State import qualified Fig.Web.DB as DB import qualified Fig.Web.LDAP as LDAP +import qualified Fig.Web.Exchange as Exchange data LiveEvent = LiveEventOnline !(Set.Set Text) @@ -188,6 +189,9 @@ app cfg cmds liveEvents currentlyLive = do Sc.get "/api/circle" do live <- liftIO $ MVar.readMVar currentlyLive Sc.text . Text.L.fromStrict . pretty . SExprList @Void $ SExprString <$> Set.toList live + Sc.get "/api/exchange" do + listings <- Exchange.getOrders db + Sc.json listings websocket "/api/circle/events" \conn -> do c <- Chan.dupChan liveEvents forever do -- cgit v1.2.3