ResetDb on login / logout

This commit is contained in:
Timon Ostertun
2020-09-22 23:44:21 +02:00
parent 7dafe9777c
commit 84e011653d

View File

@@ -133,12 +133,14 @@ var login = function() {
localStorage.setItem('auth_hash', data.auth); localStorage.setItem('auth_hash', data.auth);
localStorage.setItem('auth_user', data.user); localStorage.setItem('auth_user', data.user);
localStorage.setItem('auth_username', data.username); localStorage.setItem('auth_username', data.username);
resetDb();
location.reload(); location.reload();
} }
}); });
} }
var logoutClearStorage = function() { var logoutClearStorage = function() {
resetDb();
localStorage.removeItem('auth_id'); localStorage.removeItem('auth_id');
localStorage.removeItem('auth_hash'); localStorage.removeItem('auth_hash');
localStorage.removeItem('auth_user'); localStorage.removeItem('auth_user');