Skip to content

Commit

Permalink
chore(index): fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
geekus committed Apr 28, 2017
1 parent 12a533d commit 053839f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ try {
prefix: process.env.STATSD_PREFIX || 'turbasen.',
});
} catch (err) {
console.error(err);
console.error(err); // eslint-disable-line no-console
}

module.exports = () => (req, res, next) => {
Expand All @@ -30,7 +30,9 @@ module.exports = () => (req, res, next) => {
statsd.increment('http.request.count');

if (req.user.type === 'token') {
statsd.increment(`http.request.count.${req.user.app.replace(/[^a-zA-Z0-9]/g, '')}`.toLowerCase());
const appName = req.user.app.replace(/[^a-zA-Z0-9]/g, '');

statsd.increment(`http.request.count.${appName}`.toLowerCase());
} else {
statsd.increment('http.request.count.anonymous');
}
Expand Down

0 comments on commit 053839f

Please sign in to comment.