change sessionStorage item

This commit is contained in:
NekoVari 2023-11-23 22:54:01 +07:00
parent ffeb499b91
commit b89ec4b279

View file

@ -117,7 +117,7 @@ export default {
}) })
.then((data) => { .then((data) => {
console.log(data.success); console.log(data.success);
sessionStorage.setItem('current_user', data.user.username); sessionStorage.setItem('current_user', JSON.stringify({id:data.user._id,username:data.user.username,email:data.user.email}));
this.$router.push({ name: 'home' }); this.$router.push({ name: 'home' });
}) })
.catch((err) => { .catch((err) => {