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
|
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
|
||||||
|
|
Loading…
Reference in a new issue