Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jovuit
funkwhale
Commits
9333fdc6
Unverified
Commit
9333fdc6
authored
May 07, 2020
by
Agate
💬
Browse files
Fix #1087: Fix playlist modal only listing 50 first playlists
parent
29c58d1c
Changes
2
Hide whitespace changes
Inline
Side-by-side
changes/changelog.d/1087.bugfix
0 → 100644
View file @
9333fdc6
Fix playlist modal only listing 50 first playlists (#1087)
front/src/store/playlists.js
View file @
9333fdc6
...
...
@@ -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
)
}
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment