Merge pull request #322 from lbryio/site-host-display
updated model to add host data
This commit is contained in:
commit
4ea983b023
1 changed files with 2 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
const logger = require('winston');
|
const logger = require('winston');
|
||||||
const { returnShortId } = require('../helpers/sequelizeHelpers.js');
|
const { returnShortId } = require('../helpers/sequelizeHelpers.js');
|
||||||
const { claim } = require('../config/speechConfig.js');
|
const { claim, site } = require('../config/speechConfig.js');
|
||||||
const { defaultThumbnail } = claim;
|
const { defaultThumbnail } = claim;
|
||||||
|
|
||||||
function determineFileExtensionFromContentType (contentType) {
|
function determineFileExtensionFromContentType (contentType) {
|
||||||
|
@ -31,6 +31,7 @@ function prepareClaimData (claim) {
|
||||||
// logger.debug('preparing claim data based on resolved data:', claim);
|
// logger.debug('preparing claim data based on resolved data:', claim);
|
||||||
claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);
|
claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);
|
||||||
claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);
|
claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);
|
||||||
|
claim['host'] = site.host;
|
||||||
return claim;
|
return claim;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue