spee.ch/server/controllers/api/claim/publish/createThumbnailPublishParams.js
Tom 1b069ba2a1 WIP - 0.37 SDK changes
Needs the metadata sub object removed, everything should be passed at the publish level - no need to set protobuf metadata directly.

Thumbnail > thumbnail_url, licenseURL > license_url and possibly a few others.
changes

fix: 1 of many
fix 2 of many
fix: 3 of many
fix: 4 of many
more fixes
fix license
fix thumb
remove tags
fix thumb?
remove log
fix
fix txid
2019-05-24 13:09:07 -04:00

26 lines
827 B
JavaScript

const logger = require('winston');
const { details, publishing } = require('@config/siteConfig');
const createThumbnailPublishParams = (thumbnailFilePath, claimName, license, licenseUrl, nsfw) => {
if (!thumbnailFilePath) {
return;
}
logger.debug(`Creating Thumbnail Publish Parameters`);
// create the publish params
return {
name: `${claimName}-thumb`,
file_path: thumbnailFilePath,
bid: publishing.fileClaimBidAmount,
title: `${claimName} thumbnail`,
description: `a thumbnail for ${claimName}`,
author: details.title,
languages: ['en'],
license,
license_url: licenseUrl,
claim_address: publishing.primaryClaimAddress,
channel_name: publishing.thumbnailChannel,
channel_id: publishing.thumbnailChannelId,
};
};
module.exports = createThumbnailPublishParams;