changed log level for routes level
This commit is contained in:
parent
5881c36986
commit
7eaf82100e
3 changed files with 5 additions and 6 deletions
|
@ -5,7 +5,7 @@ const logger = require('winston');
|
||||||
module.exports = app => {
|
module.exports = app => {
|
||||||
// route to run a claim_list request on the daemon
|
// route to run a claim_list request on the daemon
|
||||||
app.get('/api/claim_list/:claim', ({ originalUrl, params }, res) => {
|
app.get('/api/claim_list/:claim', ({ originalUrl, params }, res) => {
|
||||||
logger.debug(`GET request on ${originalUrl}`);
|
logger.info(`GET request on ${originalUrl}`);
|
||||||
lbryApi
|
lbryApi
|
||||||
.getClaimsList(params.claim)
|
.getClaimsList(params.claim)
|
||||||
.then(claimsList => {
|
.then(claimsList => {
|
||||||
|
@ -17,7 +17,7 @@ module.exports = app => {
|
||||||
});
|
});
|
||||||
// route to run a resolve request on the daemon
|
// route to run a resolve request on the daemon
|
||||||
app.get('/api/resolve/:uri', ({ originalUrl, params }, res) => {
|
app.get('/api/resolve/:uri', ({ originalUrl, params }, res) => {
|
||||||
logger.debug(`GET request on ${originalUrl}`);
|
logger.info(`GET request on ${originalUrl}`);
|
||||||
lbryApi
|
lbryApi
|
||||||
.resolveUri(params.uri)
|
.resolveUri(params.uri)
|
||||||
.then(resolvedUri => {
|
.then(resolvedUri => {
|
||||||
|
|
|
@ -34,7 +34,7 @@ function serveFile ({ fileName, fileType, filePath }, res) {
|
||||||
module.exports = (app, ua, googleAnalyticsId) => {
|
module.exports = (app, ua, googleAnalyticsId) => {
|
||||||
// route to fetch one free public claim
|
// route to fetch one free public claim
|
||||||
app.get('/:name/:claim_id', ({ originalUrl, params }, res) => {
|
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}`;
|
const routeString = `${params.name}/${params.claim_id}`;
|
||||||
// google analytics
|
// google analytics
|
||||||
ua(googleAnalyticsId, { https: true }).event('Serve Route', '/name/claimId', routeString).send();
|
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
|
// route to fetch one free public claim
|
||||||
app.get('/:name', ({ originalUrl, params }, res) => {
|
app.get('/:name', ({ originalUrl, params }, res) => {
|
||||||
logger.debug(`Get request on ${originalUrl}`);
|
logger.info(`Get request on ${originalUrl}`);
|
||||||
// google analytics
|
// google analytics
|
||||||
ua(googleAnalyticsId, { https: true }).event('Serve Route', '/name', params.name).send();
|
ua(googleAnalyticsId, { https: true }).event('Serve Route', '/name', params.name).send();
|
||||||
// begin image-serve processes
|
// begin image-serve processes
|
||||||
|
|
|
@ -5,14 +5,13 @@ const logger = require('winston');
|
||||||
module.exports = (app, ua, googleAnalyticsId) => {
|
module.exports = (app, ua, googleAnalyticsId) => {
|
||||||
// route to fetch all free public claims
|
// route to fetch all free public claims
|
||||||
app.get('/:name/all', ({ originalUrl, params }, res) => {
|
app.get('/:name/all', ({ originalUrl, params }, res) => {
|
||||||
logger.debug(`Get request on ${originalUrl}`);
|
logger.info(`Get request on ${originalUrl}`);
|
||||||
// google analytics
|
// google analytics
|
||||||
ua(googleAnalyticsId, { https: true }).event('Show Routes', '/name/all', `${params.name}/all`).send();
|
ua(googleAnalyticsId, { https: true }).event('Show Routes', '/name/all', `${params.name}/all`).send();
|
||||||
// fetch all free public claims
|
// fetch all free public claims
|
||||||
showController
|
showController
|
||||||
.getAllClaims(params.name)
|
.getAllClaims(params.name)
|
||||||
.then(orderedFreePublicClaims => {
|
.then(orderedFreePublicClaims => {
|
||||||
logger.debug(`${originalUrl} getAllClaims returned successfully.`);
|
|
||||||
res.status(200).render('allClaims', { claims: orderedFreePublicClaims });
|
res.status(200).render('allClaims', { claims: orderedFreePublicClaims });
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
|
|
Loading…
Reference in a new issue