Skip to content

Commit 053839f

Browse files
committed
chore(index): fix linting
1 parent 12a533d commit 053839f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

index.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ try {
1212
prefix: process.env.STATSD_PREFIX || 'turbasen.',
1313
});
1414
} catch (err) {
15-
console.error(err);
15+
console.error(err); // eslint-disable-line no-console
1616
}
1717

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

3232
if (req.user.type === 'token') {
33-
statsd.increment(`http.request.count.${req.user.app.replace(/[^a-zA-Z0-9]/g, '')}`.toLowerCase());
33+
const appName = req.user.app.replace(/[^a-zA-Z0-9]/g, '');
34+
35+
statsd.increment(`http.request.count.${appName}`.toLowerCase());
3436
} else {
3537
statsd.increment('http.request.count.anonymous');
3638
}

0 commit comments

Comments
 (0)