Added auto-refresh ts3user every 60s
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Phil 2024-10-28 13:12:02 +01:00
parent 2b3ecbe35a
commit 830d028de4
Signed by: Phil
GPG key ID: 350C8B7C4EF5DED4

View file

@ -28,6 +28,7 @@ import axios from 'axios'
<script>
import axios from 'axios'
export default {
data() {
return {
@ -35,6 +36,11 @@ import axios from 'axios'
}
},
mounted() {
this.fetchUsers()
this.intervalfetchUsers()
},
methods: {
fetchUsers() {
axios
.get('https://fastdl.hackmi.ch/ts3users/users.info')
.then(response => {
@ -45,6 +51,12 @@ import axios from 'axios'
this.errored = true
})
.finally(() => this.loading = false)
},
intervalfetchUsers() {
setInterval(() => {
this.fetchUsers();
}, 60000);
}
}
}
</script>