diff --git a/changes/changelog.d/1087.bugfix b/changes/changelog.d/1087.bugfix new file mode 100644 index 0000000000000000000000000000000000000000..36293d96a42cad53eca6f82eb7bfc6f0f761f505 --- /dev/null +++ b/changes/changelog.d/1087.bugfix @@ -0,0 +1 @@ +Fix playlist modal only listing 50 first playlists (#1087) diff --git a/front/src/store/playlists.js b/front/src/store/playlists.js index d0e144d803eec7917ea67ebc486f1f95c29e8e83..60f8771ac994e2773760c2a3f4600c4d29e131f6 100644 --- a/front/src/store/playlists.js +++ b/front/src/store/playlists.js @@ -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) } } }