mirror of
https://github.com/franjsco/tick3t
synced 2024-12-27 09:53:37 +01:00
refactor: localStorage -> sessionStorage
This commit is contained in:
parent
5c05e84ccc
commit
9c98501038
@ -16,14 +16,14 @@ function login(email, password) {
|
||||
return fetch(`${config.baseURL}users/login`, options)
|
||||
.then(handleResponse)
|
||||
.then(user => {
|
||||
localStorage.setItem('user', JSON.stringify(user));
|
||||
sessionStorage.setItem('user', JSON.stringify(user));
|
||||
return user;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
function logout() {
|
||||
localStorage.removeItem('user');
|
||||
sessionStorage.removeItem('user');
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user