public async Task <object> Post(CreatePlaylist request) { var result = await _playlistManager.CreatePlaylist(new PlaylistCreationRequest { Name = request.Name, ItemIdList = SplitValue(request.Ids, ','), UserId = request.UserId, MediaType = request.MediaType }).ConfigureAwait(false); return(ToOptimizedResult(result)); }
public async Task <object> Post(CreatePlaylist request) { var result = await _playlistManager.CreatePlaylist(new PlaylistCreationRequest { Name = request.Name, ItemIdList = (request.Ids ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList(), UserId = request.UserId, MediaType = request.MediaType }).ConfigureAwait(false); return(ToOptimizedResult(result)); }
public object Post(CreatePlaylist request) { var task = _playlistManager.CreatePlaylist(new PlaylistCreationOptions { Name = request.Name, ItemIdList = (request.Ids ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList(), UserId = request.UserId }); var item = task.Result; var dto = _dtoService.GetBaseItemDto(item, new List <ItemFields>()); return(ToOptimizedResult(new PlaylistCreationResult { Id = dto.Id })); }