From 395c5983ea11f08f672e1c91b164cd11490a3088 Mon Sep 17 00:00:00 2001 From: Alex <56329333+404-Program-not-found@users.noreply.github.com> Date: Fri, 25 Mar 2022 10:14:15 +1300 Subject: [PATCH] fix: api key not provided in /next calls --- NUXT/plugins/innertube.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/NUXT/plugins/innertube.js b/NUXT/plugins/innertube.js index b52d621..a5b1e6c 100644 --- a/NUXT/plugins/innertube.js +++ b/NUXT/plugins/innertube.js @@ -98,7 +98,7 @@ class Innertube { async getVidAsync(id) { let data = { context: this.context, videoId: id }; const responseNext = await Http.post({ - url: `${constants.URLS.YT_BASE_API}/next?v=${id}`, + url: `${constants.URLS.YT_BASE_API}/next?key=${this.key}`, data: data, headers: constants.INNERTUBE_HEADER(this.context.client), }).catch((error) => error); @@ -181,11 +181,9 @@ class Innertube { response.data.output?.playabilityStatus?.status == ("ERROR" || undefined) ) throw new Error( - `Could not get information for video: ${ - response.status_code || - response.data.output?.playabilityStatus?.status - } - ${ - response.message || response.data.output?.playabilityStatus?.reason + `Could not get information for video: ${response.status_code || + response.data.output?.playabilityStatus?.status + } - ${response.message || response.data.output?.playabilityStatus?.reason }` ); const responseInfo = response.data.output;