From 6e53b3aa2715dd93998af828769853ae8f4f06f7 Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Fri, 21 Feb 2025 21:49:33 -0500 Subject: Add shader endpoint --- fig-web/src/Fig/Web.hs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'fig-web') diff --git a/fig-web/src/Fig/Web.hs b/fig-web/src/Fig/Web.hs index b08a032..8444f08 100644 --- a/fig-web/src/Fig/Web.hs +++ b/fig-web/src/Fig/Web.hs @@ -189,6 +189,12 @@ 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/shader" do + DB.get db "shader" >>= \case + Nothing -> do + Sc.status status404 + Sc.text "no shader present" + Just sh -> Sc.text . Text.L.fromStrict $ decodeUtf8 sh Sc.get "/api/exchange" do listings <- Exchange.getOrders db Sc.json listings -- cgit v1.2.3