Ejemplo n.º 1
0
        public async Task <ActionResult> ApproveTvRequest([FromRoute] int id, [FromBody] ApproveTvRequestCommand command)
        {
            command.RequestId = id;

            var result = await _mediator.Send(command);

            return(result.ToResultIfValid <NoContentResult>());
        }
Ejemplo n.º 2
0
 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
             }
         }
     };
 }