Update changelog

This commit is contained in:
Rene Vergara 2022-08-20 08:18:40 -05:00
parent fbc41f9333
commit acf2103f0c
Signed by: pitmutt
GPG Key ID: 65122AD495A7F5B2
2 changed files with 4 additions and 23 deletions

View File

@ -8,9 +8,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- API endpoint to request a Xero invoice
- API endpoint to generate ZGo order from external invoice
- Type `XeroInvResponse`
- Type `XeroInvoice`
- Type `XeroToken`
- API endpoint to save a `XeroToken`
- API endpoint to query a Xero access token
- Type `Xero`
- API endpoint to query Xero configuration
- Field `crmToken` for `Owner`

View File

@ -544,27 +544,6 @@ routes pipe config = do
status ok200
Web.Scotty.json (object ["invdata" .= toJSON xI])
else status noContent204
post "/api/xerotoken" $ do
o <- jsonData
let q = payload (o :: Payload XeroToken)
_ <- liftIO $ run (upsertToken q)
status created201
get "/api/xerotoken" $ do
a <- param "address"
t <- liftIO $ run (findToken a)
case t of
Nothing -> status noContent204
Just t1 -> do
let xToken = cast' (Doc t1)
case xToken of
Nothing -> status noContent204
Just xt -> do
status ok200
Web.Scotty.json
(object
[ "message" .= ("Token found" :: String)
, "token" .= toJSON (xt :: XeroToken)
])
--Get user associated with session
get "/api/user" $ do
sess <- param "session"