diff options
| author | LLLL Colonq <llll@colonq> | 2025-01-07 22:53:01 -0500 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2025-01-07 22:53:01 -0500 |
| commit | a55a65a2da8e0d0a8350d9e672a5beaa013bd7b1 (patch) | |
| tree | 5fdc89111ab8087f4a624d82440f3debd834a197 /fig-web/src/Fig/Web.hs | |
| parent | 3146193b0f9dc87f0282a28a3135f73c50bffd36 (diff) | |
Add initial exchange
Diffstat (limited to 'fig-web/src/Fig/Web.hs')
| -rw-r--r-- | fig-web/src/Fig/Web.hs | 4 |
1 files changed, 4 insertions, 0 deletions
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 |
