Support for 0.37 SDK #1008

Merged
tzarebczan merged 3 commits from 0.37-fixes into master 2019-05-27 00:34:22 +02:00
2 changed files with 15 additions and 5 deletions
Showing only changes of commit b98fffc386 - Show all commits

View file

@ -47,7 +47,7 @@ const createPublishParams = (
publishParams['thumbnail_url'] = thumbnail; publishParams['thumbnail_url'] = thumbnail;
} }
if (nsfw) { if (nsfw) {
publishParams.tags = 'mature'; publishParams.tags = ['mature'];
} }
// add channel details if publishing to a channel // add channel details if publishing to a channel
if (channelName && channelClaimId) { if (channelName && channelClaimId) {

View file

@ -149,9 +149,19 @@ const claimUpdate = ({ body, files, headers, ip, originalUrl, user, tor }, res)
claim_address: primaryClaimAddress, claim_address: primaryClaimAddress,
channel_name: channelName, channel_name: channelName,
channel_id: channelId, channel_id: channelId,
metadata, title,
description,
author: details.title,
languages: ['en'],
license: license || '',
license_url: licenseUrl || '',
tags: [],
}; };
if (nsfw) {
publishParams.tags = ['mature'];
}
if (files.file) { if (files.file) {
if (thumbnailUpdate) { if (thumbnailUpdate) {
// publish new thumbnail // publish new thumbnail
@ -185,14 +195,14 @@ const claimUpdate = ({ body, files, headers, ip, originalUrl, user, tor }, res)
if (channelName) { if (channelName) {
return chainquery.claim.queries.getShortClaimIdFromLongClaimId( return chainquery.claim.queries.getShortClaimIdFromLongClaimId(
result.certificateId, publishResult.certificateId,
channelName channelName
); );
} else { } else {
return chainquery.claim.queries return chainquery.claim.queries
.getShortClaimIdFromLongClaimId(result.claimId, name, result) .getShortClaimIdFromLongClaimId(publishResult.claimId, name, publishResult)
.catch(() => { .catch(() => {
return result.claimId.slice(0, 1); return publishResult.claimId.slice(0, 1);
}); });
} }
}) })