diff options
| author | LLLL Colonq <llll@colonq> | 2025-05-30 02:55:35 -0400 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2025-05-30 02:55:55 -0400 |
| commit | f95d9bbde51ee26468177b2d34c669d9689fbea4 (patch) | |
| tree | 9790f7a39c70e1cc2c6a0d418ace38dcf7a1aa51 /fig-web/src/Fig/Web/Module/Circle.hs | |
| parent | bab19289fd0b0f7a26056c4f20b5a0f456c9bf57 (diff) | |
web: Big refactor part 2
Diffstat (limited to 'fig-web/src/Fig/Web/Module/Circle.hs')
| -rw-r--r-- | fig-web/src/Fig/Web/Module/Circle.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fig-web/src/Fig/Web/Module/Circle.hs b/fig-web/src/Fig/Web/Module/Circle.hs index 5c21477..5db59fb 100644 --- a/fig-web/src/Fig/Web/Module/Circle.hs +++ b/fig-web/src/Fig/Web/Module/Circle.hs @@ -18,13 +18,13 @@ import Fig.Utils.SExpr import Fig.Web.Utils import Fig.Web.Types -public :: Module +public :: PublicModule public a = do onGet "/api/circle" do live <- liftIO $ MVar.readMVar a.globals.currentlyLive respondText $ pretty . SExprList @Void $ SExprString <$> Set.toList live -publicWebsockets :: Websockets +publicWebsockets :: PublicWebsockets publicWebsockets a = [ ( "/api/circle/events", \conn -> do c <- Chan.dupChan a.channels.live @@ -44,11 +44,11 @@ publicWebsockets a = ) ] -publicBusEvents :: BusEvents +publicBusEvents :: PublicBusEvents publicBusEvents a = [ ("monitor twitch stream online", \d -> do let dstr = decodeUtf8 d - let live = Text.splitOn " " dstr + let live = Text.words dstr let new = Set.fromList live old <- MVar.swapMVar a.globals.currentlyLive new let online = Set.difference new old |
