fixed substring issue and added no claim/no channel pages
This commit is contained in:
parent
b0d88263c7
commit
ab14adca00
5 changed files with 20 additions and 16 deletions
controllers
|
@ -108,15 +108,16 @@ function chooseThumbnail (claimInfo, defaultThumbnail) {
|
|||
|
||||
module.exports = {
|
||||
getAssetByClaim (claimName, claimId) {
|
||||
logger.debug('getting asset by claim');
|
||||
logger.debug(`getAssetByClaim(${claimName}, ${claimId})`);
|
||||
return new Promise((resolve, reject) => {
|
||||
db.getLongClaimId(claimName, claimId) // 1. get the long claim id
|
||||
.then(result => { // 2. get the asset using the long claim id
|
||||
logger.debug('getLongClaimId result:', result);
|
||||
if (result === NO_CLAIM) {
|
||||
logger.debug('resolving NO_CLAIM');
|
||||
resolve(NO_CLAIM);
|
||||
return;
|
||||
}
|
||||
logger.debug('long claim id = ', result);
|
||||
resolve(getAssetByLongClaimId(result, claimName));
|
||||
})
|
||||
.catch(error => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue