public async Task <ActionResult> Create([FromRoute] Guid eventId, CreateChallengeCommand command)
        {
            if (eventId != command.EventId)
            {
                return(BadRequest());
            }

            return(Ok(await Mediator.Send(command)));
        }
示例#2
0
 public async Task <ChallengeDto> Create([FromBody] CreateChallengeCommand command)
 {
     return(await Mediator.Send(command));
 }
        public async Task <ActionResult> CreateChallenge([FromBody] CreateChallengeCommand command)
        {
            await _commandDispatcher.SendAsync <CreateChallengeCommand>(command);

            return(Ok());
        }