updated model to add host data #322

Merged
bones7242 merged 1 commit from site-host-display into master 2018-01-09 22:25:30 +01:00

View file

@ -1,6 +1,6 @@
const logger = require('winston');
const { returnShortId } = require('../helpers/sequelizeHelpers.js');
const { claim } = require('../config/speechConfig.js');
const { claim, site } = require('../config/speechConfig.js');
const { defaultThumbnail } = claim;
function determineFileExtensionFromContentType (contentType) {
@ -31,6 +31,7 @@ function prepareClaimData (claim) {
// logger.debug('preparing claim data based on resolved data:', claim);
claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);
claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);
claim['host'] = site.host;
return claim;
};