diff options
| author | Zephyrrus <[email protected]> | 2021-01-07 21:39:47 +0200 |
|---|---|---|
| committer | Zephyrrus <[email protected]> | 2021-01-07 21:39:47 +0200 |
| commit | a838d024a7b74e69b7fb65b9c1db4a3a900d160e (patch) | |
| tree | 87a7ea1801fea5c2003134f17076a105806f7a1f /src/site/store | |
| parent | feat: change mutation timestamp on every database mutation (diff) | |
| parent | fix: indentation (diff) | |
| download | host.fuwn.me-a838d024a7b74e69b7fb65b9c1db4a3a900d160e.tar.xz host.fuwn.me-a838d024a7b74e69b7fb65b9c1db4a3a900d160e.zip | |
Merge branch 'feature/stats-dashboard' into feature/system_status_page
Diffstat (limited to 'src/site/store')
| -rw-r--r-- | src/site/store/admin.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/site/store/admin.js b/src/site/store/admin.js index 58b63b5..b2d1926 100644 --- a/src/site/store/admin.js +++ b/src/site/store/admin.js @@ -11,7 +11,8 @@ export const state = () => ({ files: [] }, file: {}, - settings: {} + settings: {}, + statistics: {} }); export const actions = { @@ -21,6 +22,12 @@ export const actions = { return response; }, + async fetchStatistics({ commit }) { + const response = await this.$axios.$get('service/statistics'); + commit('setStatistics', response); + + return response; + }, async fetchUsers({ commit }) { const response = await this.$axios.$get('admin/users'); commit('setUsers', response); @@ -89,6 +96,9 @@ export const mutations = { setSettings(state, { config }) { state.settings = config; }, + setStatistics(state, { statistics }) { + state.statistics = statistics; + }, setUsers(state, { users }) { state.users = users; }, |