finished troubleshooting updates
This commit is contained in:
parent
c26724bfd8
commit
fe0d33846b
6 changed files with 9 additions and 9 deletions
|
@ -1,11 +1,11 @@
|
|||
const logger = require('winston');
|
||||
const postToAnalytics = require('../helpers/libraries/analytics');
|
||||
const { postToAnalytics } = require('./analytics');
|
||||
|
||||
module.exports = {
|
||||
handleRequestError (action, originalUrl, ip, error, res) {
|
||||
logger.error('Request Error >>', error);
|
||||
if (error === 'NO_CLAIMS' || error === 'NO_FREE_PUBLIC_CLAIMS') {
|
||||
postToAnalytics(action, originalUrl, ip, 'success (no claims)');
|
||||
postToAnalytics(action, originalUrl, ip, 'success');
|
||||
res.status(307).render('noClaims');
|
||||
} else if (error.response) {
|
||||
postToAnalytics(action, originalUrl, ip, 'error.response.data.error.messsage');
|
||||
|
|
|
@ -5,7 +5,7 @@ const publishController = require('../controllers/publishController.js');
|
|||
const lbryApi = require('../helpers/libraries/lbryApi.js');
|
||||
const publishHelpers = require('../helpers/libraries/publishHelpers.js');
|
||||
const errorHandlers = require('../helpers/libraries/errorHandlers.js');
|
||||
const postToAnalytics = require('../helpers/libraries/analytics');
|
||||
const { postToAnalytics } = require('../helpers/libraries/analytics');
|
||||
|
||||
module.exports = app => {
|
||||
// route to run a claim_list request on the daemon
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const logger = require('winston');
|
||||
const postToAnalytics = require('../helpers/libraries/analytics');
|
||||
const { postToAnalytics } = require('../helpers/libraries/analytics');
|
||||
|
||||
module.exports = app => {
|
||||
// route for the home page
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const errorHandlers = require('../helpers/libraries/errorHandlers.js');
|
||||
const serveController = require('../controllers/serveController.js');
|
||||
const logger = require('winston');
|
||||
const postToAnalytics = require('../helpers/libraries/analytics');
|
||||
const { postToAnalytics } = require('../helpers/libraries/analytics');
|
||||
|
||||
function serveFile ({ fileName, fileType, filePath }, res) {
|
||||
logger.info(`serving file ${fileName}`);
|
||||
|
@ -38,9 +38,9 @@ module.exports = (app) => {
|
|||
logger.debug(`GET request on ${originalUrl} from ${ip}`);
|
||||
// begin image-serve processes
|
||||
serveController
|
||||
.getClaimByClaimId('serve', params.name, params.claim_id)
|
||||
.getClaimByClaimId(params.name, params.claim_id)
|
||||
.then(fileInfo => {
|
||||
postToAnalytics(originalUrl, ip, 'success');
|
||||
postToAnalytics('serve', originalUrl, ip, 'success');
|
||||
serveFile(fileInfo, res);
|
||||
})
|
||||
.catch(error => {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const errorHandlers = require('../helpers/libraries/errorHandlers.js');
|
||||
const showController = require('../controllers/showController.js');
|
||||
const logger = require('winston');
|
||||
const postToAnalytics = require('../helpers/libraries/analytics');
|
||||
const { postToAnalytics } = require('../helpers/libraries/analytics');
|
||||
|
||||
module.exports = (app) => {
|
||||
// route to fetch all free public claims
|
||||
|
|
|
@ -2,7 +2,7 @@ const logger = require('winston');
|
|||
const publishController = require('../controllers/publishController.js');
|
||||
const publishHelpers = require('../helpers/libraries/publishHelpers.js');
|
||||
const errorHandlers = require('../helpers/libraries/errorHandlers.js');
|
||||
const postToAnalytics = require('../helpers/libraries/analytics');
|
||||
const { postToAnalytics } = require('../helpers/libraries/analytics');
|
||||
|
||||
module.exports = (app, siofu, hostedContentPath) => {
|
||||
const http = require('http').Server(app);
|
||||
|
|
Loading…
Reference in a new issue