Correct HTTP codes for invdata
This commit is contained in:
parent
87efbf0613
commit
cd93f0031d
1 changed files with 10 additions and 10 deletions
|
@ -649,7 +649,7 @@ routes pipe config = do
|
|||
let invReq = payload (invData :: Payload XeroInvoiceRequest)
|
||||
case cast' . Doc =<< xeroConfig of
|
||||
Nothing -> do
|
||||
status noContent204
|
||||
status ok200
|
||||
Web.Scotty.json
|
||||
(object
|
||||
[ "reportType" .= (1 :: Integer)
|
||||
|
@ -660,7 +660,7 @@ routes pipe config = do
|
|||
o <- liftAndCatchIO $ run $ findOwnerById $ xr_owner invReq
|
||||
case cast' . Doc =<< o of
|
||||
Nothing -> do
|
||||
status noContent204
|
||||
status ok200
|
||||
Web.Scotty.json
|
||||
(object
|
||||
[ "reportType" .= (2 :: Integer)
|
||||
|
@ -679,7 +679,7 @@ routes pipe config = do
|
|||
oaddress o'
|
||||
case resInv of
|
||||
Nothing -> do
|
||||
status noContent204
|
||||
status ok200
|
||||
Web.Scotty.json
|
||||
(object
|
||||
[ "reportType" .= (2 :: Integer)
|
||||
|
@ -701,7 +701,7 @@ routes pipe config = do
|
|||
T.unpack . ocurrency $ o')
|
||||
case cast' . Doc =<< pr of
|
||||
Nothing -> do
|
||||
status noContent204
|
||||
status ok200
|
||||
Web.Scotty.json
|
||||
(object
|
||||
[ "reportType" .=
|
||||
|
@ -755,7 +755,7 @@ routes pipe config = do
|
|||
text
|
||||
"Unable to save order to DB"
|
||||
Just fO -> do
|
||||
status ok200
|
||||
status created201
|
||||
Web.Scotty.json
|
||||
(object
|
||||
[ "reportType" .=
|
||||
|
@ -766,7 +766,7 @@ routes pipe config = do
|
|||
, "shop" .= oname o'
|
||||
])
|
||||
else do
|
||||
status noContent204
|
||||
status ok200
|
||||
Web.Scotty.json
|
||||
(object
|
||||
[ "reportType" .=
|
||||
|
@ -777,7 +777,7 @@ routes pipe config = do
|
|||
(Nothing :: Maybe String)
|
||||
])
|
||||
else do
|
||||
status noContent204
|
||||
status ok200
|
||||
Web.Scotty.json
|
||||
(object
|
||||
[ "reportType" .= (7 :: Integer)
|
||||
|
@ -786,7 +786,7 @@ routes pipe config = do
|
|||
, "shop" .= (Nothing :: Maybe String)
|
||||
])
|
||||
else do
|
||||
status noContent204
|
||||
status ok200
|
||||
Web.Scotty.json
|
||||
(object
|
||||
[ "reportType" .= (6 :: Integer)
|
||||
|
@ -794,7 +794,7 @@ routes pipe config = do
|
|||
, "shop" .= (Nothing :: Maybe String)
|
||||
])
|
||||
else do
|
||||
status noContent204
|
||||
status ok200
|
||||
Web.Scotty.json
|
||||
(object
|
||||
[ "reportType" .= (5 :: Integer)
|
||||
|
@ -802,7 +802,7 @@ routes pipe config = do
|
|||
, "shop" .= (Nothing :: Maybe String)
|
||||
])
|
||||
else do
|
||||
status noContent204
|
||||
status ok200
|
||||
Web.Scotty.json
|
||||
(object
|
||||
[ "reportType" .= (1 :: Integer)
|
||||
|
|
Loading…
Reference in a new issue