From d21ab2e4b096ff2efc0b3d7ad396ab14d7f989e6 Mon Sep 17 00:00:00 2001 From: bill bittner Date: Wed, 7 Mar 2018 18:57:35 -0800 Subject: [PATCH] updated console logs and error messages --- controllers/publishController.js | 3 +-- models/claim.js | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/controllers/publishController.js b/controllers/publishController.js index a332fe3f..55078caa 100644 --- a/controllers/publishController.js +++ b/controllers/publishController.js @@ -96,11 +96,10 @@ module.exports = { .then(result => { if (result.length >= 1) { const claimAddress = config.wallet.lbryClaimAddress; - // filter out any results that were not published from spee.ch's wallet address + // filter out any that were not published from this address const filteredResult = result.filter((claim) => { return (claim.address === claimAddress); }); - // return based on whether any non-spee.ch claims were left if (filteredResult.length >= 1) { throw new Error('That claim is already in use'); }; diff --git a/models/claim.js b/models/claim.js index 0641ab65..35d8c4bd 100644 --- a/models/claim.js +++ b/models/claim.js @@ -349,14 +349,13 @@ module.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, DECIMAL }) => { where: { name, claimId }, }) .then(claimArray => { - logger.debug('claims found on resolve:', claimArray.length); switch (claimArray.length) { case 0: return resolve(null); case 1: return resolve(prepareClaimData(claimArray[0].dataValues)); default: - logger.error(`more than one entry matches that name (${name}) and claimID (${claimId})`); + logger.error(`more than one record matches ${name}#${claimId} in db.Claim`); return resolve(prepareClaimData(claimArray[0].dataValues)); } })