feature/improved data gathering from API

This commit is contained in:
Joaquin Paredes committed 2025-05-06 18:13:31 -07:00
1 parent a173b8c70c
commit 5bbfde3127
3 files changed
+12 -7

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;
}