fixed claimId and show workflow for spee.ch/example

This commit is contained in:
bill bittner 2017-11-27 10:22:47 -08:00
parent 279a44d760
commit 78bc163586
4 changed files with 21 additions and 11 deletions

View file

@ -3,6 +3,7 @@ const logger = require('winston');
const DEFAULT_THUMBNAIL = 'https://spee.ch/assets/img/video_thumb_default.png';
const NO_CHANNEL = 'NO_CHANNEL';
const NO_FILE = 'NO_FILE';
function chooseThumbnail (claimInfo, defaultThumbnail) {
if (!claimInfo.thumbnail || claimInfo.thumbnail.trim() === '') {
@ -100,7 +101,7 @@ module.exports = {
return db.File.findOne({where: {claimId, name}})
.then(file => {
if (!file) {
return null;
return NO_FILE;
}
return file.dataValues;
});