Gitter migration: Setup redirects (rollout pt. 3)
[gitter.git] / server / web / middlewares / record-client-usage-stats.js
blob193c160b29b159f965f993d79a974ac2b2b0c72c
1 'use strict';
3 var clientUsageStats = require('../../utils/client-usage-stats');
5 module.exports = function(req, res, next) {
6 var user = req.user;
7 var client = req.authInfo && req.authInfo.client;
9 if (user && client) {
10 clientUsageStats.record(user, client, req);
13 next();