fix: updates!
This commit is contained in:
parent
adbafa4194
commit
b98fffc386
2 changed files with 15 additions and 5 deletions
|
@ -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) {
|
||||||
|
|
|
@ -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);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue