Support stream updates via claim_id parameter (#1465)
* Support stream updates via claim_id parameter * Pass claim_id on v2
This commit is contained in:
parent
4c25ae721e
commit
0998e3d48c
4 changed files with 11 additions and 1 deletions
|
@ -9,6 +9,8 @@ WEB_SERVER_PORT=1337
|
|||
|
||||
# -- APIs ---
|
||||
LBRY_WEB_API=https://api.na-backend.odysee.com
|
||||
LBRY_WEB_PUBLISH_API=https://publish.na-backend.odysee.com/v1
|
||||
LBRY_WEB_PUBLISH_API_V2=https://publish.na-backend.odysee.com/api/v2/publish/
|
||||
LBRY_WEB_BUFFER_API=https://collector-service.api.lbry.tv/api/v1/events/video
|
||||
COMMENT_SERVER_API=https://comments.odysee.tv/api/v2
|
||||
SEARCH_SERVER_API_ALT=https://recsys.odysee.tv/search
|
||||
|
|
1
flow-typed/publish.js
vendored
1
flow-typed/publish.js
vendored
|
@ -57,6 +57,7 @@ declare type TusUploader = any;
|
|||
|
||||
declare type FileUploadSdkParams = {
|
||||
file_path: string | File,
|
||||
claim_id: ?string,
|
||||
name: ?string,
|
||||
preview?: boolean,
|
||||
remote_url?: string,
|
||||
|
|
|
@ -97,8 +97,10 @@ function resolvePublishPayload(publishData, myClaimForUri, myChannels, preview)
|
|||
const channelId = namedChannelClaim ? namedChannelClaim.claim_id : '';
|
||||
|
||||
const nowTimeStamp = Number(Math.round(Date.now() / 1000));
|
||||
const { claim_id: claimId } = myClaimForUri || {};
|
||||
|
||||
const publishPayload: {
|
||||
claim_id?: string,
|
||||
name: ?string,
|
||||
bid: string,
|
||||
description?: string,
|
||||
|
@ -131,6 +133,10 @@ function resolvePublishPayload(publishData, myClaimForUri, myChannels, preview)
|
|||
preview: false,
|
||||
};
|
||||
|
||||
if (claimId) {
|
||||
publishPayload.claim_id = claimId;
|
||||
}
|
||||
|
||||
// Temporary solution to keep the same publish flow with the new tags api
|
||||
// Eventually we will allow users to enter their own tags on publish
|
||||
// `nsfw` will probably be removed
|
||||
|
|
|
@ -20,7 +20,8 @@ export default function apiPublishCallViaWeb(
|
|||
const isMarkdown = filePath && typeof filePath === 'object' && filePath.type === 'text/markdown';
|
||||
|
||||
if (!filePath && !remoteUrl) {
|
||||
return apiCall(method, params, resolve, reject);
|
||||
const { claim_id: claimId, ...otherParams } = params;
|
||||
return apiCall(method, otherParams, resolve, reject);
|
||||
}
|
||||
|
||||
let fileField = filePath;
|
||||
|
|
Loading…
Reference in a new issue