mirror of
https://github.com/moparisthebest/kaiwa
synced 2024-11-22 09:12:19 -05:00
Add disconnect on logout
This commit is contained in:
parent
b5b32f3958
commit
4849929f83
@ -1,4 +1,4 @@
|
||||
/*global app, me*/
|
||||
/*global app, me, client*/
|
||||
"use strict";
|
||||
|
||||
var Backbone = require('backbone');
|
||||
@ -41,6 +41,9 @@ module.exports = Backbone.Router.extend({
|
||||
}
|
||||
},
|
||||
logout: function () {
|
||||
if (client.sessionStarted) {
|
||||
client.disconnect();
|
||||
}
|
||||
localStorage.clear();
|
||||
window.location = '/login';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user