diff --git a/src/ZGoBackend.hs b/src/ZGoBackend.hs index a91066e..9ef0d30 100644 --- a/src/ZGoBackend.hs +++ b/src/ZGoBackend.hs @@ -643,9 +643,10 @@ routes pipe config = do if res then status ok200 else status noContent204 - get "/invdata" $ do - invReq <- jsonData + post "/invdata" $ do + invData <- jsonData xeroConfig <- liftAndCatchIO $ run findXero + let invReq = payload (invData :: Payload XeroInvoiceRequest) case cast' . Doc =<< xeroConfig of Nothing -> do status noContent204