mirror of
https://gitlab.science.ru.nl/technicie/MarietjeDjango.git
synced 2025-12-09 22:12:22 +01:00
Allow users to delete or move their requested songs down.
This commit is contained in:
@ -19,11 +19,12 @@ def song_to_dict(song, hash=False, user=False):
|
||||
return data
|
||||
|
||||
|
||||
def playlist_song_to_dict(playlist_song, hash=False):
|
||||
def playlist_song_to_dict(playlist_song, hash=False, user=None):
|
||||
return {
|
||||
'id': playlist_song.id,
|
||||
'requested_by': 'Marietje' if playlist_song.user is None else playlist_song.user.name,
|
||||
'song': song_to_dict(playlist_song.song, hash=hash)
|
||||
'song': song_to_dict(playlist_song.song, hash=hash),
|
||||
'can_move_down': playlist_song.user is not None and playlist_song.user == user
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user