changed log level for routes level

This commit is contained in:
bill bittner 2017-06-19 16:19:22 -07:00
parent 5881c36986
commit 7eaf82100e
3 changed files with 5 additions and 6 deletions

View file

@ -5,7 +5,7 @@ const logger = require('winston');
module.exports = app => {
// route to run a claim_list request on the daemon
app.get('/api/claim_list/:claim', ({ originalUrl, params }, res) => {
logger.debug(`GET request on ${originalUrl}`);
logger.info(`GET request on ${originalUrl}`);
lbryApi
.getClaimsList(params.claim)
.then(claimsList => {
@ -17,7 +17,7 @@ module.exports = app => {
});
// route to run a resolve request on the daemon
app.get('/api/resolve/:uri', ({ originalUrl, params }, res) => {
logger.debug(`GET request on ${originalUrl}`);
logger.info(`GET request on ${originalUrl}`);
lbryApi
.resolveUri(params.uri)
.then(resolvedUri => {

View file

@ -34,7 +34,7 @@ function serveFile ({ fileName, fileType, filePath }, res) {
module.exports = (app, ua, googleAnalyticsId) => {
// route to fetch one free public claim
app.get('/:name/:claim_id', ({ originalUrl, params }, res) => {
logger.debug(`Get request on ${originalUrl}`);
logger.info(`Get request on ${originalUrl}`);
const routeString = `${params.name}/${params.claim_id}`;
// google analytics
ua(googleAnalyticsId, { https: true }).event('Serve Route', '/name/claimId', routeString).send();
@ -52,7 +52,7 @@ module.exports = (app, ua, googleAnalyticsId) => {
});
// route to fetch one free public claim
app.get('/:name', ({ originalUrl, params }, res) => {
logger.debug(`Get request on ${originalUrl}`);
logger.info(`Get request on ${originalUrl}`);
// google analytics
ua(googleAnalyticsId, { https: true }).event('Serve Route', '/name', params.name).send();
// begin image-serve processes

View file

@ -5,14 +5,13 @@ const logger = require('winston');
module.exports = (app, ua, googleAnalyticsId) => {
// route to fetch all free public claims
app.get('/:name/all', ({ originalUrl, params }, res) => {
logger.debug(`Get request on ${originalUrl}`);
logger.info(`Get request on ${originalUrl}`);
// google analytics
ua(googleAnalyticsId, { https: true }).event('Show Routes', '/name/all', `${params.name}/all`).send();
// fetch all free public claims
showController
.getAllClaims(params.name)
.then(orderedFreePublicClaims => {
logger.debug(`${originalUrl} getAllClaims returned successfully.`);
res.status(200).render('allClaims', { claims: orderedFreePublicClaims });
})
.catch(error => {