From 20c409cdb308bcdd7e3e5ddffa97cc026ee2ab47 Mon Sep 17 00:00:00 2001 From: dumbmoron Date: Wed, 10 Jul 2024 15:14:28 +0000 Subject: [PATCH] generate-youtube-tokens: update response format --- src/util/generate-youtube-tokens.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/generate-youtube-tokens.js b/src/util/generate-youtube-tokens.js index 924afb13..ab877f96 100644 --- a/src/util/generate-youtube-tokens.js +++ b/src/util/generate-youtube-tokens.js @@ -20,9 +20,9 @@ tube.session.once( ); tube.session.once('auth-error', (err) => bail('An error occurred:', err)); -tube.session.once('auth', ({ status, credentials, ...rest }) => { - if (status !== 'SUCCESS') { - bail('something went wrong', rest); +tube.session.once('auth', ({ credentials }) => { + if (!credentials.access_token) { + bail('something went wrong'); } console.log(