diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..f6da509 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,42 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +### Added + +- Changelog +- `paid` field in ZGoOrder type +- Test for `api/order/:id` endpoint with an invalid ID + +## Fixed + +- Bug #1: crash when invalid ID was provided to `api/order/:id` + +## [0.1.0.1] - 2022-05-20 + +### Added + +- Parametrized fullnode credentials + +## [0.1.0.0] - 2022-05-19 + +### Added + +- BOSL license +- API end points + - Country + - Block + - Node address + - User + - Owner + - Order + - Item +- Processing + - Zcash transactions to ZGo items + - Convert login memos to Users + - Mark Owners as paid when payment is found on chain + - Mark Owners as expired when expiration date is reached diff --git a/ChangeLog.md b/ChangeLog.md deleted file mode 100644 index 09271a5..0000000 --- a/ChangeLog.md +++ /dev/null @@ -1,3 +0,0 @@ -# Changelog for zgo-backend - -## Unreleased changes diff --git a/README.md b/README.md index e958eb7..e03b5d3 100644 --- a/README.md +++ b/README.md @@ -1 +1,12 @@ -# zgo-backend +# ZGo Back End + +The API server behind the [ZGo.cash](https://zgo.cash) app. + +## Dependencies + +- Zcash Full node +- MongoDB + +## Configuration + +The file `zgo.cfg` needs to be modified to put the correct parameters for implementation. diff --git a/package.yaml b/package.yaml index 9e0ee60..58a78c0 100644 --- a/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: zgo-backend -version: 0.1.0.1 +version: 0.1.0.2 git: "https://gitlab.com/pitmutt/zgo-backend" license: BOSL author: "Rene Vergara" @@ -8,7 +8,7 @@ copyright: "Copyright (c) 2022 Vergara Technologies LLC" extra-source-files: - README.md -- ChangeLog.md +- CHANGELOG.md - zgo.cfg # Metadata used when publishing your package diff --git a/src/ZGoBackend.hs b/src/ZGoBackend.hs index 633652a..098c960 100644 --- a/src/ZGoBackend.hs +++ b/src/ZGoBackend.hs @@ -400,7 +400,7 @@ routes pipe db passkey nodeAddress nodeUser nodePwd = do then do liftIO $ run (deleteUser userId) status ok200 - else status unprocessableEntity422 + else status noContent204 --Get current blockheight from Zcash node get "/api/blockheight" $ do blockInfo <- makeZcashCall nodeUser nodePwd "getblock" ["-1"] @@ -456,7 +456,7 @@ routes pipe db passkey nodeAddress nodeUser nodePwd = do then do liftIO $ run (deleteItem oId) status ok200 - else status unprocessableEntity422 + else status noContent204 --Get price for Zcash get "/api/price" $ do curr <- param "currency" @@ -504,7 +504,7 @@ routes pipe db passkey nodeAddress nodeUser nodePwd = do [ "message" .= ("Order found!" :: String) , "order" .= toJSON (pOrder :: ZGoOrder) ]) - else status unprocessableEntity422 + else status noContent204 --Get order by session get "/api/order" $ do sess <- param "session"