public async Task <IActionResult> CreateOneAsync( [FromBody] CreatePublicationDto createPublicationDto ) { var item = await _publicationService.CreateOneAsync(createPublicationDto); return(Ok(item)); }
public async Task <IActionResult> CreateOneAsync( [FromBody] CreatePublicationDto createPublicationDto ) { try { var created = await _publicationService.CreateOneAsync(createPublicationDto); return(Ok(created)); } catch (Exception e) { return(HttpExceptionMapper.ToHttpActionResult(e)); } }