From 73b7a1259642d93e39665d01c647b1a6de1a8d74 Mon Sep 17 00:00:00 2001 From: Martin Zwigl Date: Sat, 8 Mar 2025 00:26:39 +0100 Subject: [PATCH] :construction: well, it is (parsing) --- apps/coin_info/clkinfo.js | 11 +++++++---- apps/coin_info/metadata.json | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/coin_info/clkinfo.js b/apps/coin_info/clkinfo.js index 9d46222c9..60f5038e2 100644 --- a/apps/coin_info/clkinfo.js +++ b/apps/coin_info/clkinfo.js @@ -22,11 +22,14 @@ // 'CMC_PRO_API_KEY': db.apikey // } }) - .then(cmcResult => ({ + .then(cmcResult => { // text: JSON.parse(cmcResult.resp).data["1"].symbol, // Fixed data path - text: cmcResult.resp.symbol, - img: COIN_ICON - })) + const apiData = JSON.parse(cmcResult.resp); // Correctly declare variable + return { + text: apiData.symbol, + img: COIN_ICON + }; + }) .catch(err => ({ text: err.toString(), img: COIN_ICON diff --git a/apps/coin_info/metadata.json b/apps/coin_info/metadata.json index e72f94822..7ae666959 100644 --- a/apps/coin_info/metadata.json +++ b/apps/coin_info/metadata.json @@ -1,7 +1,7 @@ { "id": "coin_info", "name": "Crypto-Coins Info", "shortName":"Coins Info", - "version": "0.04.19", + "version": "0.04.20", "description": "Crypto-Coins Infos with the help of the Coinmarketcap API", "icon": "app.png", "tags": "clkinfo",