Enhance invdata
endpoint for Xero invoices
This commit is contained in:
parent
f29c5ecb03
commit
bd4d611d04
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue