diff --git a/CHANGELOG.md b/CHANGELOG.md index cccc5c4..8b4c957 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed +- `api/orderx` endpoint. - `makeZcashCall` function moved to the generic `zcash-haskell` library. - `RpcResponse`, `RpcCall` types moved to the generic `zcash-haskell` library. diff --git a/src/ZGoBackend.hs b/src/ZGoBackend.hs index 7673ea1..cd57477 100644 --- a/src/ZGoBackend.hs +++ b/src/ZGoBackend.hs @@ -1400,26 +1400,26 @@ routes pipe config = do , "order" .= toJSON (pOrder :: ZGoOrder) ]) --Upsert xero order - post "/api/orderx" $ do - newOrder <- jsonData - let q = payload (newOrder :: Payload ZGoOrder) - _ <- liftIO $ run (upsertXeroOrder q) - myOrder <- - liftAndCatchIO $ - run (findXeroOrder (qaddress q) (qexternalInvoice q) (qshortCode q)) - case myOrder of - Nothing -> status noContent204 - Just o -> do - let o' = cast' (Doc o) - case o' of - Nothing -> status internalServerError500 - Just pOrder -> do - status created201 - Web.Scotty.json - (object - [ "message" .= ("Order found!" :: String) - , "order" .= toJSON (pOrder :: ZGoOrder) - ]) + {-post "/api/orderx" $ do-} + {-newOrder <- jsonData-} + {-let q = payload (newOrder :: Payload ZGoOrder)-} + {-_ <- liftIO $ run (upsertXeroOrder q)-} + {-myOrder <--} + {-liftAndCatchIO $-} + {-run (findXeroOrder (qaddress q) (qexternalInvoice q) (qshortCode q))-} + {-case myOrder of-} + {-Nothing -> status noContent204-} + {-Just o -> do-} + {-let o' = cast' (Doc o)-} + {-case o' of-} + {-Nothing -> status internalServerError500-} + {-Just pOrder -> do-} + {-status created201-} + {-Web.Scotty.json-} + {-(object-} + {-[ "message" .= ("Order found!" :: String)-} + {-, "order" .= toJSON (pOrder :: ZGoOrder)-} + {-])-} -- Upsert order post "/api/order" $ do newOrder <- jsonData