Commit d1a55c84 authored by TTS Kieu Tuan Anh's avatar TTS Kieu Tuan Anh

set status loggedIn

parent 1b425cec
......@@ -55,6 +55,7 @@ export default {
}),
});
localStorage.removeItem("token");
this.$auth.$storage.setUniversal("loggedIn", 'false');
this.$router.push("/");
},
},
......
......@@ -95,6 +95,7 @@ export default {
localStorage.setItem("token", resp.data.bearer_token);
this.$auth.$storage.setUniversal("token", resp.data.bearer_token);
this.$auth.$storage.setUniversal("userName", resp.data.name);
this.$auth.$storage.setUniversal("loggedIn", 'true');
if (resp.status == "success") {
this.$router.push("home");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment