1
0
mirror of https://github.com/franjsco/tick3t synced 2024-12-27 09:53:37 +01:00

refactor: localStorage -> sessionStorage

This commit is contained in:
Francesco Esposito 2019-07-31 21:50:03 +02:00
parent 5c05e84ccc
commit 9c98501038

View File

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