Merge branch 'feature/challenge1' of https://github.com/JoaquinPar/2800-202510-BBY14 into feature/challenge1

This commit is contained in:
Joaquin committed 2025-05-06 18:15:51 -07:00
commit 93a5c45dd9
2 files changed
+10 -6

No files matched your search

+5 -6
View File
@@ -1,7 +1,6 @@
function convert(from) {
fetch(`https://api.frankfurter.dev/v1/latest?base=${from}`)
.then((resp) => resp.json())
.then((data) => {
console.log(data);
});
async function convert(from) {
const res = await fetch(`https://api.frankfurter.dev/v1/latest?base=${from}`);
const data = await res.json();
return data;
}
+5
View File
@@ -1 +1,6 @@
const { getCollection } = require('./src/database/connection');
async function saveExchangeRates() {
const { currencies } = getCollection();
await currencies.insertMany(convert());
}