diff options
| author | Kana <[email protected]> | 2021-01-21 00:51:43 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-01-21 00:51:43 +0900 |
| commit | e779706ab7bf0ae9f41864ed4ecd34da24fc003e (patch) | |
| tree | 2b7646a6d18e3d99d55f5ead102a82870e21f54a /src/site/pages/dashboard/admin/statistics.vue | |
| parent | chore: remove console logs (diff) | |
| parent | feat: prevent embeds being nsfw (diff) | |
| download | host.fuwn.me-e779706ab7bf0ae9f41864ed4ecd34da24fc003e.tar.xz host.fuwn.me-e779706ab7bf0ae9f41864ed4ecd34da24fc003e.zip | |
Merge pull request #254 from WeebDev/feature/ssr
Feature/ssr
Diffstat (limited to 'src/site/pages/dashboard/admin/statistics.vue')
| -rw-r--r-- | src/site/pages/dashboard/admin/statistics.vue | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/site/pages/dashboard/admin/statistics.vue b/src/site/pages/dashboard/admin/statistics.vue index c1e79fc..1b951fc 100644 --- a/src/site/pages/dashboard/admin/statistics.vue +++ b/src/site/pages/dashboard/admin/statistics.vue @@ -78,16 +78,13 @@ export default { detailed, generic }, - middleware: ['auth', 'admin', ({ store }) => { - try { - store.dispatch('admin/fetchStatistics'); - } catch (e) { - console.error(e); - } - }], + middleware: ['auth', 'admin'], computed: mapState({ stats: state => state.admin.statistics }), + async asyncData({ app }) { + await app.store.dispatch('admin/fetchStatistics'); + }, methods: { refresh(category) { try { |