From ef3db8a4114aa0ef66ea5f9e15bbc83e1f36f33a Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 30 Mar 2020 09:12:38 -0700 Subject: Don't read the body until I need it --- Run/Que.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Run/Que.hs') diff --git a/Run/Que.hs b/Run/Que.hs index 4855c2d..8171fbe 100644 --- a/Run/Que.hs +++ b/Run/Que.hs @@ -88,10 +88,10 @@ routes = do -- | Put a value on a que. Returns immediately. Scotty.post (Scotty.regex quepath) <| do (ns, qp) <- extract - qdata <- Scotty.body -- ensure namespace exists app . modify <| upsertNamespace ns - q <- app <| que ns qp + q <- app <| que ns qp + qdata <- Scotty.body liftIO <| pushQue (BSL.toStrict qdata) q return () -- cgit v1.2.3