updated code formatting
This commit is contained in:
parent
3db9e8e4ca
commit
59cb5b24ee
2 changed files with 31 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
|||
const createClaimRecordDataAfterPublish = (certificateId, channelName, fileType, publishParams, publishResults) => {
|
||||
const createClaimRecordDataAfterPublish = (certificateId, channelName, fileName, fileType, publishParams, publishResults) => {
|
||||
const {
|
||||
name,
|
||||
metadata: {
|
||||
|
@ -10,11 +10,13 @@ const createClaimRecordDataAfterPublish = (certificateId, channelName, fileType,
|
|||
claim_address: address,
|
||||
bid: amount,
|
||||
} = publishParams;
|
||||
|
||||
const {
|
||||
claim_id: claimId,
|
||||
txid,
|
||||
nout,
|
||||
} = publishResults;
|
||||
|
||||
return {
|
||||
name,
|
||||
claimId,
|
||||
|
|
|
@ -28,9 +28,23 @@ const getFileDimensions = (fileType, filePath) => {
|
|||
};
|
||||
|
||||
const createFileRecordDataAfterGet = (resolveResult, getResult) => {
|
||||
const { name, claimId, outpoint, contentType: fileType } = resolveResult;
|
||||
const { file_name: fileName, download_path: filePath } = getResult;
|
||||
const { height: fileHeight, width: fileWidth } = getFileDimensions(fileType, filePath);
|
||||
const {
|
||||
name,
|
||||
claimId,
|
||||
outpoint,
|
||||
contentType: fileType,
|
||||
} = resolveResult;
|
||||
|
||||
const {
|
||||
file_name: fileName,
|
||||
download_path: filePath,
|
||||
} = getResult;
|
||||
|
||||
const {
|
||||
height: fileHeight,
|
||||
width: fileWidth,
|
||||
} = getFileDimensions(fileType, filePath);
|
||||
|
||||
return {
|
||||
name,
|
||||
claimId,
|
||||
|
@ -44,8 +58,17 @@ const createFileRecordDataAfterGet = (resolveResult, getResult) => {
|
|||
};
|
||||
|
||||
const createFileRecordDataAfterPublish = (fileName, fileType, publishParams, publishResults) => {
|
||||
const { name, claim_id: claimId, file_path: filePath } = publishParams;
|
||||
const { txid, nout } = publishResults;
|
||||
const {
|
||||
name,
|
||||
file_path: filePath,
|
||||
} = publishParams;
|
||||
|
||||
const {
|
||||
claim_id: claimId,
|
||||
txid,
|
||||
nout,
|
||||
} = publishResults;
|
||||
|
||||
const { height: fileHeight, width: fileWidth } = getFileDimensions(fileType, filePath);
|
||||
|
||||
return {
|
||||
|
|
Loading…
Add table
Reference in a new issue