public async Task <IHttpActionResult> Add(AddOrUpdateArticleRequest request) { try { await _mediator.Send(request); return(Ok()); } catch (ArticleSlugExistsException) { return(Conflict()); } }
public async Task <IHttpActionResult> Update(AddOrUpdateArticleRequest request) { request.TenantUniqueId = Request.GetTenantUniqueId(); return(Ok(await _mediator.Send(request))); }
public async Task <IHttpActionResult> Update(AddOrUpdateArticleRequest request) => Ok(await _mediator.Send(request));