Fixed handling of case where incorrect claim name is given #229

Merged
bones7242 merged 2 commits from redesign-polish into master 2017-10-30 23:01:35 +01:00
3 changed files with 5 additions and 3 deletions
Showing only changes of commit ff9379ffb7 - Show all commits

View file

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

View file

@ -1,4 +1,4 @@
<div class="row">
<div class="row row--padded">
<h3>No Channel</h3>
<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>

View file

@ -1,4 +1,4 @@
<div class="row">
<div class="row row--padded">
<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>NOTE: it is possible your claim was published, but it is still being processed by the blockchain</p>