repo.or.cz
/
gitter.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Gitter migration: Setup redirects (rollout pt. 3)
[gitter.git]
/
server
/
web
/
middlewares
/
record-client-usage-stats.js
blob
193c160b29b159f965f993d79a974ac2b2b0c72c
1
'use strict'
;
2
3
var
clientUsageStats
=
require
(
'../../utils/client-usage-stats'
);
4
5
module
.
exports
=
function
(
req
,
res
,
next
) {
6
var
user
=
req
.
user
;
7
var
client
=
req
.
authInfo
&&
req
.
authInfo
.
client
;
8
9
if
(
user
&&
client
) {
10
clientUsageStats
.
record
(
user
,
client
,
req
);
11
}
12
13
next
();
14
};