repo.or.cz
/
gitter.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Gitter migration: Setup redirects (rollout pt. 3)
[gitter.git]
/
server
/
event-listeners
/
destroy-user-tokens-listener.js
blob
d5c4d89e46cd6206fa3fdb5dfe9dfaf78dae0eae
1
'use strict';
2
3
var appEvents = require('gitter-web-appevents');
4
var userService = require('gitter-web-users');
5
6
var installed = false;
7
exports.install = function() {
8
if (installed) return;
9
installed = true;
10
11
appEvents.onDestroyUserTokens(function(userId) {
12
return userService.destroyTokensForUserId(userId);
13
});
14
};