updated handling for incorrect claim names

This commit is contained in:
bill bittner 2017-10-30 14:57:50 -07:00
parent bd90700229
commit ff9379ffb7
3 changed files with 5 additions and 3 deletions

View file

@ -12,6 +12,7 @@ const NO_CHANNEL = 'NO_CHANNEL';
const NO_CLAIM = 'NO_CLAIM'; const NO_CLAIM = 'NO_CLAIM';
function checkForLocalAssetByClaimId (claimId, name) { function checkForLocalAssetByClaimId (claimId, name) {
logger.debug(`checkForLocalAssetsByClaimId(${claimId}, ${name}`);
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
db.File db.File
.findOne({where: { name, claimId }}) .findOne({where: { name, claimId }})
@ -69,7 +70,8 @@ function getAssetByLongClaimId (fullClaimId, name) {
logger.debug('resolve result >> ', resolveResult); logger.debug('resolve result >> ', resolveResult);
// if no result, return early (claim doesn't exist or isn't free) // if no result, return early (claim doesn't exist or isn't free)
if (!resolveResult) { if (!resolveResult) {
return resolve(null); resolve(NO_CLAIM);
return;
} }
let fileRecord = {}; let fileRecord = {};
// get the claim // get the claim

View file

@ -1,4 +1,4 @@
<div class="row"> <div class="row row--padded">
<h3>No Channel</h3> <h3>No Channel</h3>
<p>There are no published channels matching your url</p> <p>There are no published channels matching your url</p>
<p>If you think this message is an error, contact us in the <a class="link--primary" href="https://discord.gg/YjYbwhS" target="_blank">LBRY Discord!</a></p> <p>If you think this message is an error, contact us in the <a class="link--primary" href="https://discord.gg/YjYbwhS" target="_blank">LBRY Discord!</a></p>

View file

@ -1,4 +1,4 @@
<div class="row"> <div class="row row--padded">
<h3>No Claims</h3> <h3>No Claims</h3>
<p>There are no free assets at that claim. You should publish one at <a class="link--primary" href="/">spee.ch</a>.</p> <p>There are no free assets at that claim. You should publish one at <a class="link--primary" href="/">spee.ch</a>.</p>
<p>NOTE: it is possible your claim was published, but it is still being processed by the blockchain</p> <p>NOTE: it is possible your claim was published, but it is still being processed by the blockchain</p>