From 248ccb12370d3e2b20a06e6080047671e25985b1 Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Sun, 18 Dec 2022 17:29:59 -0500 Subject: [PATCH] fix(plugins/community/stock): undefined quoteType --- source/plugins/community/stock/index.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/plugins/community/stock/index.mjs b/source/plugins/community/stock/index.mjs index d34b55d9..dbfb66b6 100644 --- a/source/plugins/community/stock/index.mjs +++ b/source/plugins/community/stock/index.mjs @@ -16,7 +16,7 @@ export default async function({login, q, imports, data, account}, {enabled = fal //Query API for company informations console.debug(`metrics/compute/${login}/plugins > stock > querying api for company`) - const {data: {quoteType: {shortName: company}}} = await imports.axios.get("https://yh-finance.p.rapidapi.com/stock/v2/get-profile", { + const {data: {quoteType: {shortName: company} = {shortName:symbol}}} = await imports.axios.get("https://yh-finance.p.rapidapi.com/stock/v2/get-profile", { params: {symbol, region: "US"}, headers: {"x-rapidapi-key": token}, })