Fix #1087: Fix playlist modal only listing 50 first playlists
This commit is contained in:
parent
29c58d1ce5
commit
9333fdc62b
|
@ -0,0 +1 @@
|
||||||
|
Fix playlist modal only listing 50 first playlists (#1087)
|
|
@ -25,14 +25,20 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
fetchOwn ({commit, rootState}) {
|
async fetchOwn ({commit, rootState}) {
|
||||||
let userId = rootState.auth.profile.id
|
let userId = rootState.auth.profile.id
|
||||||
if (!userId) {
|
if (!userId) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
return axios.get('playlists/', {params: {user: userId}}).then((response) => {
|
let playlists = []
|
||||||
commit('playlists', response.data.results)
|
let url = 'playlists/'
|
||||||
})
|
while (url != null) {
|
||||||
|
let response = await axios.get(url, {params: {user: userId}})
|
||||||
|
playlists = [...playlists, ...response.data.results]
|
||||||
|
url = response.data.next
|
||||||
|
|
||||||
|
}
|
||||||
|
commit('playlists', playlists)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue