public async Task <ActionResult> ApproveTvRequest([FromRoute] int id, [FromBody] ApproveTvRequestCommand command) { command.RequestId = id; var result = await _mediator.Send(command); return(result.ToResultIfValid <NoContentResult>()); }
private void GivenACommand(bool approveAll) { _command = new ApproveTvRequestCommand { ApproveAll = approveAll, RequestId = 1, EpisodesBySeason = new Dictionary <int, List <int> > { [1] = new List <int> { 1, 2, 3 }, [2] = new List <int> { 1, 2, 3, 4, 56 } } }; }