diff options
| author | Pitu <[email protected]> | 2021-01-20 14:09:06 +0900 |
|---|---|---|
| committer | Pitu <[email protected]> | 2021-01-20 14:09:06 +0900 |
| commit | a3bf693d30d3c1c1d9e4073830522554c3f1c4e8 (patch) | |
| tree | c1902391d0eb2f059030c2c41a08f91422d80eed /src/site/pages/dashboard/account.vue | |
| parent | feat: enable ssr and serve it with the api (diff) | |
| download | host.fuwn.me-a3bf693d30d3c1c1d9e4073830522554c3f1c4e8.tar.xz host.fuwn.me-a3bf693d30d3c1c1d9e4073830522554c3f1c4e8.zip | |
chore: switch to asyncData where needed
Diffstat (limited to 'src/site/pages/dashboard/account.vue')
| -rw-r--r-- | src/site/pages/dashboard/account.vue | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/site/pages/dashboard/account.vue b/src/site/pages/dashboard/account.vue index 05b969b..5d5d775 100644 --- a/src/site/pages/dashboard/account.vue +++ b/src/site/pages/dashboard/account.vue @@ -104,9 +104,7 @@ export default { components: { Sidebar }, - middleware: ['auth', ({ store }) => { - store.dispatch('auth/fetchCurrentUser'); - }], + middleware: ['auth'], data() { return { password: '', @@ -120,6 +118,9 @@ export default { user: state => state.auth.user }) }, + async asyncData({ app }) { + await app.store.dispatch('auth/fetchCurrentUser'); + }, methods: { ...mapActions({ getUserSetttings: 'auth/fetchCurrentUser' |