public Either <DomainError, ServiceResponse> Execute(string trackId, string playlistId)
        {
            var playList = playListPersistence.GetPlayList(playlistId);
            var error    = playList.Remove(trackId);

            if (error.IsSome)
            {
                return(error.ValueUnsafe());
            }

            playListPersistence.Persist(playList);
            tracksNotifier.NotifyTrackHasRemovedFromPlayList(trackId, playlistId);
            return(ServiceResponse.Success);
        }
Exemplo n.º 2
0
 public async Task Handle(TrackHasBeenRemovedFromPlayList @event)
 {
     tracksNotifier.NotifyTrackHasRemovedFromPlayList(@event.TrackId, @event.PlayListId);
     await websocketPort.PushMessageWithEventToAll(@event);
 }
Exemplo n.º 3
0
 public void Handle(TrackHasBeenRemovedFromPlayList @event)
 {
     tracksNotifier.NotifyTrackHasRemovedFromPlayList(@event.TrackId, @event.PlayListId);
 }