summaryrefslogtreecommitdiff
path: root/Que/Server.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Que/Server.hs')
-rw-r--r--Que/Server.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Que/Server.hs b/Que/Server.hs
index 8eda6fb..4cb0b32 100644
--- a/Que/Server.hs
+++ b/Que/Server.hs
@@ -54,6 +54,9 @@ import Network.Wai.Middleware.RequestLogger
)
import qualified System.Envy as Envy
import qualified Web.Scotty.Trans as Scotty
+import qualified Prelude
+
+{-# ANN module ("HLint: ignore Reduce duplication" :: Prelude.String) #-}
main :: IO ()
main = Exception.bracket startup shutdown <| uncurry Warp.run
@@ -133,10 +136,10 @@ routes = do
-- client.
Scotty.get (Scotty.regex quepath) <| do
(ns, qp) <- extract
+ guardNs ns ["pub", "_"]
app . modify <| upsertNamespace ns
q <- app <| que ns qp
poll <- Scotty.param "poll" !: (pure . const False)
- guardNs ns ["pub", "_"]
if poll
then Scotty.stream $ streamQue q
else do