mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 03:52:14 +00:00
use callback itself as context
This commit is contained in:
parent
9e95f9c17d
commit
e6c1a72c39
1 changed files with 2 additions and 2 deletions
|
|
@ -112,7 +112,7 @@ api.registerUser = function(req, res, next) {
|
|||
ga.event('register', 'Local').send();
|
||||
user.save(function(err, savedUser){
|
||||
utils.txnEmail(savedUser, 'welcome');
|
||||
cb.apply(this, arguments);
|
||||
cb.apply(cb, arguments);
|
||||
});
|
||||
}
|
||||
}]
|
||||
|
|
@ -182,7 +182,7 @@ api.loginSocial = function(req, res, next) {
|
|||
user = new User(user);
|
||||
user.save(function(err, savedUser){
|
||||
utils.txnEmail(savedUser, 'welcome');
|
||||
cb.apply(this, arguments);
|
||||
cb.apply(cb, arguments);
|
||||
});
|
||||
|
||||
ga.event('register', network).send();
|
||||
|
|
|
|||
Loading…
Reference in a new issue