Unverified Commit 9333fdc6 authored by Agate's avatar Agate 💬
Browse files

Fix #1087: Fix playlist modal only listing 50 first playlists

parent 29c58d1c
Fix playlist modal only listing 50 first playlists (#1087)
......@@ -25,14 +25,20 @@ export default {
}
},
actions: {
fetchOwn ({commit, rootState}) {
async fetchOwn ({commit, rootState}) {
let userId = rootState.auth.profile.id
if (!userId) {
return
}
return axios.get('playlists/', {params: {user: userId}}).then((response) => {
commit('playlists', response.data.results)
})
let playlists = []
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)
}
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment