faster stat

This commit is contained in:
Jonathan Baecker 2020-04-16 18:30:31 +02:00
parent 47ff11e9f8
commit 240bef3f67

View File

@ -209,7 +209,10 @@ export default {
}
},
sysStats () {
async sysStats () {
const response = await this.$axios.get('api/stats/?stats=all', { headers: { Authorization: 'Bearer ' + this.$store.state.auth.jwtToken }, progress: false })
this.stat = response.data
this.interval = setInterval(async () => {
await this.$store.dispatch('auth/inspectToken')
const response = await this.$axios.get('api/stats/?stats=all', { headers: { Authorization: 'Bearer ' + this.$store.state.auth.jwtToken }, progress: false })