add back 'remove' function
This commit is contained in:
parent
1523bbd33f
commit
31647e4ee7
3 changed files with 18 additions and 8 deletions
11
dist/bundle.es.js
vendored
11
dist/bundle.es.js
vendored
|
@ -1261,7 +1261,7 @@ const LbryFirst = {
|
|||
upload: (params = {}) => {
|
||||
// Only upload when originally publishing for now
|
||||
if (!params.file_path) {
|
||||
return new Promise();
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
const uploadParams = {
|
||||
|
@ -1285,6 +1285,11 @@ const LbryFirst = {
|
|||
return lbryFirstCallWithResult('youtube.Signup', emptyParams);
|
||||
},
|
||||
|
||||
remove: () => {
|
||||
const emptyParams = {};
|
||||
return lbryFirstCallWithResult('youtube.Remove', emptyParams);
|
||||
},
|
||||
|
||||
// Connect to lbry-first
|
||||
connect: () => {
|
||||
if (LbryFirst.connectPromise === null) {
|
||||
|
@ -1330,14 +1335,14 @@ function checkAndParse$1(response) {
|
|||
|
||||
function apiCall$1(method, params, resolve, reject) {
|
||||
const counter = new Date().getTime();
|
||||
params = [params];
|
||||
const paramsArray = [params];
|
||||
const options = {
|
||||
method: 'POST',
|
||||
headers: LbryFirst.apiRequestHeaders,
|
||||
body: JSON.stringify({
|
||||
jsonrpc: '2.0',
|
||||
method,
|
||||
params,
|
||||
params: paramsArray,
|
||||
id: counter
|
||||
})
|
||||
};
|
||||
|
|
10
dist/flow-typed/LbryFirst.js
vendored
10
dist/flow-typed/LbryFirst.js
vendored
|
@ -71,9 +71,9 @@ declare type UploadResponse = {
|
|||
|
||||
declare type HasYTAuthResponse = {
|
||||
HashAuth: boolean,
|
||||
}
|
||||
};
|
||||
|
||||
declare type YTSignupResponse = {}
|
||||
declare type YTSignupResponse = {};
|
||||
|
||||
//
|
||||
// Types used in the generic LbryFirst object that is exported
|
||||
|
@ -93,7 +93,7 @@ declare type LbryFirstTypes = {
|
|||
stop: () => Promise<string>,
|
||||
status: () => Promise<StatusResponse>,
|
||||
version: () => Promise<VersionResponse>,
|
||||
upload: (params: {}) => Promise<UploadResponse>,
|
||||
hasYTAuth: () =>Promise<HasYTAuthResponse>,
|
||||
ytSignup: () =>Promise<YTSignupResponse>,
|
||||
upload: any => Promise<?UploadResponse>,
|
||||
hasYTAuth: () => Promise<HasYTAuthResponse>,
|
||||
ytSignup: () => Promise<YTSignupResponse>,
|
||||
};
|
||||
|
|
|
@ -74,6 +74,11 @@ const LbryFirst: LbryFirstTypes = {
|
|||
return lbryFirstCallWithResult('youtube.Signup', emptyParams);
|
||||
},
|
||||
|
||||
remove: () => {
|
||||
const emptyParams = {};
|
||||
return lbryFirstCallWithResult('youtube.Remove', emptyParams);
|
||||
},
|
||||
|
||||
// Connect to lbry-first
|
||||
connect: () => {
|
||||
if (LbryFirst.connectPromise === null) {
|
||||
|
|
Loading…
Reference in a new issue