diff options
Diffstat (limited to 'www/js/auth.js')
-rw-r--r-- | www/js/auth.js | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/www/js/auth.js b/www/js/auth.js index c533219..3931022 100644 --- a/www/js/auth.js +++ b/www/js/auth.js @@ -25,19 +25,16 @@ var Rdxport = Rdxport || {}; Rdxport.Auth = function() { - console.log('auth'); this.username = sessionStorage.getItem('auth_username'); this.fullname = sessionStorage.getItem('auth_fullname'); this.token = sessionStorage.getItem('auth_token'); }; Rdxport.Auth.prototype.isLoggedIn = function() { - console.log('isLoggedIn'); return this.username && this.fullname && this.token; }; Rdxport.Auth.prototype.set = function(username, fullname, token) { - console.log('set'); this.username = username; this.fullname = fullname; this.token = token; @@ -48,7 +45,6 @@ Rdxport.Auth.prototype.set = function(username, fullname, token) { }; Rdxport.Auth.prototype.cleanup = function() { - console.log('cleanup'); sessionStorage.removeItem('auth_username'); sessionStorage.removeItem('auth_fullname'); sessionStorage.removeItem('auth_token'); @@ -59,7 +55,6 @@ Rdxport.Auth.prototype.cleanup = function() { }; Rdxport.AuthView = function(model) { - console.log('AuthView'); this.model = model; }; @@ -69,7 +64,7 @@ Rdxport.AuthView.prototype.renderLoggedIn = function() { $('#username-field').html(this.model.fullname + ' (' + this.model.username + ')'); $('button.logout').off().on('click', function() { - router.logout(); + router.route('logout'); }); }; |