Explorar o código

Fixed issue where you couldn't remove songs from a playlist.

KrisVos130 %!s(int64=8) %!d(string=hai) anos
pai
achega
61846c283f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      backend/logic/actions/playlists.js

+ 1 - 1
backend/logic/actions/playlists.js

@@ -360,7 +360,7 @@ let lib = {
 
 			(playlist, next) => {
 				if (!playlist || playlist.createdBy !== userId) return next('Playlist not found');
-				db.models.playlist.update({_id: playlistId}, {$pull: {songs: {_id: songId}}}, next);
+				db.models.playlist.update({_id: playlistId}, {$pull: {songs: {songId: songId}}}, next);
 			},
 
 			(res, next) => {