migrate vuex modules
This commit is contained in:
1 parent
9c5ce9acf3
commit
f39e155301
17 files changed
+177
-133
No files matched your search
@@ -33,18 +33,18 @@ export default defineComponent({
|
||||
}
|
||||
if (this.accessToken && this.refreshToken) {
|
||||
// store token to global store
|
||||
await this.$store.dispatch('setToken', {
|
||||
await this.$store.dispatch('common/setToken', {
|
||||
refresh: this.refreshToken,
|
||||
access: this.accessToken
|
||||
});
|
||||
console.debug('set token successfully');
|
||||
const { data: user } = await userOperator.getMe();
|
||||
await this.$store.dispatch('setUser', user);
|
||||
await this.$store.dispatch('common/setUser', user);
|
||||
console.debug('set user successfully');
|
||||
const { data: applications } = await applicationOperator.getAll({
|
||||
user_id: user.id
|
||||
});
|
||||
await this.$store.dispatch('setApplications', applications);
|
||||
await this.$store.dispatch('common/setApplications', applications);
|
||||
console.debug('set applications successfully');
|
||||
if (this.redirect) {
|
||||
this.$router.push(this.redirect);
|
||||
|
||||
Reference in new issue
Block a user