Add CHANGELOG and README

This commit is contained in:
Rene Vergara 2022-05-24 13:10:01 -05:00
parent 31c11aafe7
commit 1bf99023b1
Signed by: pitmutt
GPG key ID: 65122AD495A7F5B2
5 changed files with 59 additions and 9 deletions

42
CHANGELOG.md Normal file
View file

@ -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

View file

@ -1,3 +0,0 @@
# Changelog for zgo-backend
## Unreleased changes

View file

@ -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.

View file

@ -1,5 +1,5 @@
name: zgo-backend name: zgo-backend
version: 0.1.0.1 version: 0.1.0.2
git: "https://gitlab.com/pitmutt/zgo-backend" git: "https://gitlab.com/pitmutt/zgo-backend"
license: BOSL license: BOSL
author: "Rene Vergara" author: "Rene Vergara"
@ -8,7 +8,7 @@ copyright: "Copyright (c) 2022 Vergara Technologies LLC"
extra-source-files: extra-source-files:
- README.md - README.md
- ChangeLog.md - CHANGELOG.md
- zgo.cfg - zgo.cfg
# Metadata used when publishing your package # Metadata used when publishing your package

View file

@ -400,7 +400,7 @@ routes pipe db passkey nodeAddress nodeUser nodePwd = do
then do then do
liftIO $ run (deleteUser userId) liftIO $ run (deleteUser userId)
status ok200 status ok200
else status unprocessableEntity422 else status noContent204
--Get current blockheight from Zcash node --Get current blockheight from Zcash node
get "/api/blockheight" $ do get "/api/blockheight" $ do
blockInfo <- makeZcashCall nodeUser nodePwd "getblock" ["-1"] blockInfo <- makeZcashCall nodeUser nodePwd "getblock" ["-1"]
@ -456,7 +456,7 @@ routes pipe db passkey nodeAddress nodeUser nodePwd = do
then do then do
liftIO $ run (deleteItem oId) liftIO $ run (deleteItem oId)
status ok200 status ok200
else status unprocessableEntity422 else status noContent204
--Get price for Zcash --Get price for Zcash
get "/api/price" $ do get "/api/price" $ do
curr <- param "currency" curr <- param "currency"
@ -504,7 +504,7 @@ routes pipe db passkey nodeAddress nodeUser nodePwd = do
[ "message" .= ("Order found!" :: String) [ "message" .= ("Order found!" :: String)
, "order" .= toJSON (pOrder :: ZGoOrder) , "order" .= toJSON (pOrder :: ZGoOrder)
]) ])
else status unprocessableEntity422 else status noContent204
--Get order by session --Get order by session
get "/api/order" $ do get "/api/order" $ do
sess <- param "session" sess <- param "session"