summaryrefslogtreecommitdiff
path: root/fig-web/src
diff options
context:
space:
mode:
Diffstat (limited to 'fig-web/src')
-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 60dbbe7..b227911 100644
--- a/fig-web/src/Fig/Web.hs
+++ b/fig-web/src/Fig/Web.hs
@@ -74,6 +74,12 @@ app cfg cmds liveEvents currentlyLive = do
Sc.scottyApp do
-- Sc.middleware $ Wai.Static.staticPolicy $ Wai.Static.addBase cfg.assetPath
Sc.get "/" $ Sc.redirect "/index.html"
+ Sc.get "/unauthorized" do
+ Sc.status status401
+ Sc.text $ mconcat
+ [ "your request was rejected because that endpoint requires authentication\n"
+ , "you can log in by POSTing your credentials to https://auth.colonq.computer/api/firstfactor\n"
+ ]
Sc.get "/api/check" $ authed cfg \auth -> do
Sc.json @[Text] [auth.id, auth.name]
Sc.put "/api/buffer" do