summaryrefslogtreecommitdiff
path: root/fig-web/src/Fig
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2025-02-21 21:49:33 -0500
committerLLLL Colonq <llll@colonq>2025-02-21 21:50:00 -0500
commit6e53b3aa2715dd93998af828769853ae8f4f06f7 (patch)
tree9a2e6a06730046ba34c978a253cf69bcfeb05a8c /fig-web/src/Fig
parentfde5b1d934f41e587281761167360533670d6e49 (diff)
Add shader endpoint
Diffstat (limited to 'fig-web/src/Fig')
-rw-r--r--fig-web/src/Fig/Web.hs6
1 files changed, 6 insertions, 0 deletions
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