mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Add on success callback to Meteor.logout.
This commit is contained in:
@@ -17,12 +17,14 @@
|
||||
}
|
||||
};
|
||||
|
||||
Meteor.logout = function () {
|
||||
Meteor.logout = function (callback) {
|
||||
Meteor.apply('logout', [], {wait: true}, function(error, result) {
|
||||
if (error)
|
||||
throw error;
|
||||
else
|
||||
else {
|
||||
Meteor.accounts.makeClientLoggedOut();
|
||||
callback && callback();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user