aboutsummaryrefslogtreecommitdiff
path: root/src/site/pages/dashboard/admin/statistics.vue
diff options
context:
space:
mode:
authorKana <[email protected]>2021-01-21 00:51:43 +0900
committerGitHub <[email protected]>2021-01-21 00:51:43 +0900
commite779706ab7bf0ae9f41864ed4ecd34da24fc003e (patch)
tree2b7646a6d18e3d99d55f5ead102a82870e21f54a /src/site/pages/dashboard/admin/statistics.vue
parentchore: remove console logs (diff)
parentfeat: prevent embeds being nsfw (diff)
downloadhost.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.vue11
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 {