pass authToken to youtube.HasAuth

This commit is contained in:
Sean Yesmunt 2020-07-10 12:36:30 -04:00
parent 0be1b75343
commit c29123e815
4 changed files with 10 additions and 8 deletions

7
dist/bundle.es.js vendored
View file

@ -1275,9 +1275,10 @@ const LbryFirst = {
return lbryFirstCallWithResult('youtube.Upload', uploadParams); return lbryFirstCallWithResult('youtube.Upload', uploadParams);
}, },
hasYTAuth: () => { hasYTAuth: token => {
const emptyParams = {}; const hasYTAuthParams = {};
return lbryFirstCallWithResult('youtube.HasAuth', emptyParams); hasYTAuthParams.AuthToken = token;
return lbryFirstCallWithResult('youtube.HasAuth', hasYTAuthParams);
}, },
ytSignup: () => { ytSignup: () => {

View file

@ -94,6 +94,6 @@ declare type LbryFirstTypes = {
status: () => Promise<StatusResponse>, status: () => Promise<StatusResponse>,
version: () => Promise<VersionResponse>, version: () => Promise<VersionResponse>,
upload: any => Promise<?UploadResponse>, upload: any => Promise<?UploadResponse>,
hasYTAuth: () => Promise<HasYTAuthResponse>, hasYTAuth: string => Promise<HasYTAuthResponse>,
ytSignup: () => Promise<YTSignupResponse>, ytSignup: () => Promise<YTSignupResponse>,
}; };

View file

@ -94,6 +94,6 @@ declare type LbryFirstTypes = {
status: () => Promise<StatusResponse>, status: () => Promise<StatusResponse>,
version: () => Promise<VersionResponse>, version: () => Promise<VersionResponse>,
upload: any => Promise<?UploadResponse>, upload: any => Promise<?UploadResponse>,
hasYTAuth: () => Promise<HasYTAuthResponse>, hasYTAuth: string => Promise<HasYTAuthResponse>,
ytSignup: () => Promise<YTSignupResponse>, ytSignup: () => Promise<YTSignupResponse>,
}; };

View file

@ -64,9 +64,10 @@ const LbryFirst: LbryFirstTypes = {
return lbryFirstCallWithResult('youtube.Upload', uploadParams); return lbryFirstCallWithResult('youtube.Upload', uploadParams);
}, },
hasYTAuth: () => { hasYTAuth: (token: string) => {
const emptyParams = {}; const hasYTAuthParams = {};
return lbryFirstCallWithResult('youtube.HasAuth', emptyParams); hasYTAuthParams.AuthToken = token;
return lbryFirstCallWithResult('youtube.HasAuth', hasYTAuthParams);
}, },
ytSignup: () => { ytSignup: () => {