Beispiel #1
0
 public async Task <SuggestionDto> Create(VoteToASuggestionDto dto) =>
 await _httpService.PostAsync <SuggestionDto>($"{BaseUrl}/{dto.SuggestionId}/votes", dto);
Beispiel #2
0
        public async Task <ActionResult <HALResponse> > Vote([FromBody] VoteToASuggestionDto dto, Guid suggestionId)
        {
            dto.SuggestionId = suggestionId;

            return(await Create <VoteToASuggestionDto, VoteToASuggestionCommand>(dto, _mediator, _mapper, _halService));
        }