Add on success callback to Meteor.logout.

This commit is contained in:
Nick Martin
2012-06-15 17:52:56 -07:00
parent dd48fbcbc2
commit e99f3519cc

View File

@@ -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();
}
});
};