add channelShortId to claim data in getClaimData
This commit is contained in:
parent
7629b17f70
commit
21467900f9
1 changed files with 6 additions and 0 deletions
|
@ -10,11 +10,17 @@ module.exports = async (data) => {
|
||||||
channelName = await chainquery.claim.queries.getClaimChannelName(certificateId).catch(()=>{});
|
channelName = await chainquery.claim.queries.getClaimChannelName(certificateId).catch(()=>{});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let channelShortId = null;
|
||||||
|
if (certificateId && channelName) {
|
||||||
|
channelShortId = await chainquery.claim.queries.getShortClaimIdFromLongClaimId(certificateId, channelName).catch(() => null);
|
||||||
|
}
|
||||||
|
|
||||||
return ({
|
return ({
|
||||||
name: data.name,
|
name: data.name,
|
||||||
title: data.title,
|
title: data.title,
|
||||||
certificateId,
|
certificateId,
|
||||||
channelName,
|
channelName,
|
||||||
|
channelShortId,
|
||||||
contentType: data.content_type || data.contentType,
|
contentType: data.content_type || data.contentType,
|
||||||
claimId: data.claim_id || data.claimId,
|
claimId: data.claim_id || data.claimId,
|
||||||
fileExt: data.generated_extension || data.fileExt,
|
fileExt: data.generated_extension || data.fileExt,
|
||||||
|
|
Loading…
Add table
Reference in a new issue