diff --git a/controllers/serveController.js b/controllers/serveController.js index e5bbcd9f..16d5ac67 100644 --- a/controllers/serveController.js +++ b/controllers/serveController.js @@ -226,6 +226,7 @@ module.exports = { fileInfo['title'] = resolveResult.title; fileInfo['description'] = resolveResult.description; if (resolveResult.certificateId) { fileInfo['certificateId'] = resolveResult.certificateId }; + if (resolveResult.channelName) { fileInfo['channelName'] = resolveResult.channelName }; showFile(fileInfo, res); return fileInfo; }) diff --git a/models/index.js b/models/index.js index 79cf7e3b..6fccf574 100644 --- a/models/index.js +++ b/models/index.js @@ -235,7 +235,7 @@ db['getAllFreeClaims'] = (name) => { db['resolveClaim'] = (name, claimId) => { return new Promise((resolve, reject) => { db - .sequelize.query(`SELECT name, claimId, outpoint, height, address, title, description, thumbnail, certificateId FROM Claim WHERE name = '${name}' AND claimId = '${claimId}'`, { type: db.sequelize.QueryTypes.SELECT }) + .sequelize.query(`SELECT name, claimId, outpoint, height, address, title, description, thumbnail, certificateId, channelName FROM Claim WHERE name = '${name}' AND claimId = '${claimId}'`, { type: db.sequelize.QueryTypes.SELECT }) .then(result => { switch (result.length) { case 0: diff --git a/views/partials/assetInfo.handlebars b/views/partials/assetInfo.handlebars index 35611db6..e9c5431c 100644 --- a/views/partials/assetInfo.handlebars +++ b/views/partials/assetInfo.handlebars @@ -1,12 +1,28 @@ +{{#if fileInfo.channelName}} +
{{fileInfo.description}}
+