ajout d'une video dans une playlist: fonctionnel

This commit is contained in:
MiharyR 2021-12-14 17:43:54 +01:00
parent 4af6891bd5
commit 95e88f93ab
3 changed files with 30 additions and 19 deletions

View file

@ -45,14 +45,14 @@ export class VideoListComponent implements OnChanges
onDelete(video0: any, indexVideo: number): void
{
let _idsVideo = this.videosInPlaylist.filter( x => (x._id !== video0._id) );
_idsVideo = _idsVideo.map( x => x._id );
console.log("_idsVideo:");
console.log(_idsVideo);
const data = {
videoId: {
id: video0._id,
action: "delete"
}
}
this.messageService
.put("playlist/update/"+this.playlist._id, {videoIds: _idsVideo})
.put("playlist/update/"+this.playlist._id, data)
.subscribe( ret => this.onDeleteCallback(ret, indexVideo), err => this.onDeleteCallback(err, indexVideo));
}