diff --git a/src/ZGoBackend.hs b/src/ZGoBackend.hs index 62d04df..99d5cde 100644 --- a/src/ZGoBackend.hs +++ b/src/ZGoBackend.hs @@ -1001,6 +1001,7 @@ routes pipe config = do Just o -> if opaid o then do + tk <- liftIO generateToken let newOrder = ZGoOrder Nothing @@ -1027,10 +1028,11 @@ routes pipe config = do (T.concat [T.pack sUrl, "-", ordId, "-", orderKey]) "" - "" + (T.pack tk) newId <- liftAndCatchIO $ run (insertWooOrder newOrder) status ok200 - Web.Scotty.json (object ["order" .= show newId]) + Web.Scotty.json + (object ["order" .= show newId, "token" .= tk]) else do status accepted202 Web.Scotty.json