Update:Paginated listening sessions

This commit is contained in:
advplyr 2022-06-04 10:52:37 -05:00
parent 0e1692d26b
commit 3171ce5aba
7 changed files with 122 additions and 49 deletions

View file

@ -138,7 +138,9 @@ export default {
this.$copyToClipboard(str, this)
},
async init() {
this.listeningSessions = await this.$axios.$get(`/api/users/${this.user.id}/listening-sessions`).catch((err) => {
this.listeningSessions = await this.$axios.$get(`/api/users/${this.user.id}/listening-sessions?page=0&itemsPerPage=10`).then((data) => {
return data.sessions || []
}).catch((err) => {
console.error('Failed to load listening sesions', err)
return []
})