Skip to content
Snippets Groups Projects
Unverified Commit 9333fdc6 authored by Agate's avatar Agate :speech_balloon:
Browse files

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

parent 29c58d1c
Branches
Tags 0.3.5
No related merge requests found
Fix playlist modal only listing 50 first playlists (#1087)
...@@ -25,14 +25,20 @@ export default { ...@@ -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)
} }
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment