Skip to content
Snippets Groups Projects
Commit 8cd40699 authored by Agate's avatar Agate 💬
Browse files

Merge branch '1087-playlists-limit' into 'master'

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

See merge request funkwhale/funkwhale!1115
parents 29c58d1c 9333fdc6
No related branches found
No related tags found
No related merge requests found
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)
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment