|
|
|
@ -41,6 +41,7 @@ export default {
|
|
|
|
.then(data => {
|
|
|
|
.then(data => {
|
|
|
|
if (data.access_token) {
|
|
|
|
if (data.access_token) {
|
|
|
|
localStorage.setItem('user', JSON.stringify(data));
|
|
|
|
localStorage.setItem('user', JSON.stringify(data));
|
|
|
|
|
|
|
|
document.cookie = `user_session=${JSON.stringify(data.access_token)}; path=/; max-age=${60 * 60 * 24 * 365}; SameSite=strict`
|
|
|
|
this.$router.push('/admin')
|
|
|
|
this.$router.push('/admin')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|