public async Task <IActionResult> AddPollingStationAsync([FromBody] PollingStationUploadModel pollingStation) { var result = await _mediator.Send(new AddPollingStation(pollingStation)); if (!result.isSuccess) { return(Problem(result.errorMessage)); } return(Ok(result.pollingStationId)); }
public async Task <IActionResult> UpdatePollingStationAsync([FromRoute] int id, [FromBody] PollingStationUploadModel pollingStation) { var result = await _mediator.Send(new UpdatePollingStation(id, pollingStation)); if (!result.isSuccess) { return(Problem(result.errorMessage)); } return(Ok()); }