aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rates.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-01-09 23:10:35 -0800
committerAdam Soltys <[email protected]>2024-01-09 23:10:39 -0800
commit7a84d2555ffabbe29b23cf6e5035b6a4be8b9eb6 (patch)
tree9fe2b7d523bbfe34176f115cb6823403fef1f802 /lib/rates.js
parente06878e18fc33e392fd16b76d1ab9f25f8bc7fbe (diff)
downloadcoinos-server-7a84d2555ffabbe29b23cf6e5035b6a4be8b9eb6.tar.gz
coinos-server-7a84d2555ffabbe29b23cf6e5035b6a4be8b9eb6.zip
remove users from archive once migrated
Diffstat (limited to 'lib/rates.js')
-rw-r--r--lib/rates.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/rates.js b/lib/rates.js
index 1172d202..518261f4 100644
--- a/lib/rates.js
+++ b/lib/rates.js
@@ -48,11 +48,13 @@ export let getRates = async () => {
if (Date.now() - date > 24 * 60 * 60 * 1000) {
date = Date.now();
try {
+ console.log("getting rates")
let r = await got(
`http://data.fixer.io/api/latest?access_key=${config.fixer}`,
).json();
let { rates: fx } = r;
let USD = fx["USD"];
+ console.log("fx", fx);
Object.keys(fx).map((k) => {
fx[k] = fx[k] / USD;