Enhance invdata endpoint for Xero invoices

This commit is contained in:
Rene Vergara 2023-06-21 14:29:41 -05:00
parent f29c5ecb03
commit bd4d611d04
Signed by: pitmutt
GPG key ID: 65122AD495A7F5B2

View file

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