diff --git a/.gitignore b/.gitignore index 6952e6e..3736a7f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules dist.tar.gz +.env diff --git a/package.json b/package.json index 74d799f..3d7fab0 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "axios": "^0.18.0", "body-parser": "^1.18.2", "cors": "^2.8.4", + "dotenv": "^8.2.0", "express": "^4.16.3", "http": "^0.0.0", "joi": "^13.3.0", diff --git a/src/index.js b/src/index.js index bf0b276..13b3cb0 100644 --- a/src/index.js +++ b/src/index.js @@ -1,3 +1,4 @@ +import {} from 'dotenv/config'; import express from 'express'; import http from 'http'; import cors from 'cors'; diff --git a/src/routes/Bank.js b/src/routes/Bank.js index 933fbfd..f21b357 100644 --- a/src/routes/Bank.js +++ b/src/routes/Bank.js @@ -81,7 +81,7 @@ function cleanTransactions(transactions, membersList = []) { ({label} = transaction) } } - return {date: new Date(transaction.settled_at), label, amount: transaction.amount_cents, type: transaction.side}; + return {date: new Date(transaction.settled_at), label, amount: transaction.amount_cents, type: transaction.side, vat_amount: transaction.vat_amount_cents}; }) } diff --git a/yarn.lock b/yarn.lock index 1756210..a9dd36f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -919,6 +919,10 @@ doctrine@^2.1.0: dependencies: esutils "^2.0.2" +dotenv@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" + ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"