Skip to content

Commit

Permalink
[Articles management][Duy] Rename enpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
duykasama committed Jan 19, 2024
1 parent e819c60 commit 8bae9cb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Domus.Api/Controllers/ArticlesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,23 @@ public async Task<IActionResult> GetArticle(Guid id)
).ConfigureAwait(false);
}

[HttpPost("create")]
[HttpPost]
public async Task<IActionResult> CreateArticle(CreateArticleRequest request)
{
return await ExecuteServiceLogic(
async () => await _articleService.CreateArticle(request).ConfigureAwait(false)
).ConfigureAwait(false);
}

[HttpPut("update/{id:guid}")]
[HttpPut("{id:guid}")]
public async Task<IActionResult> UpdateArticle(UpdateArticleRequest request, Guid articleId)
{
return await ExecuteServiceLogic(
async () => await _articleService.UpdateArticle(request, articleId).ConfigureAwait(false)
).ConfigureAwait(false);
}

[HttpDelete("delete/{id:guid}")]
[HttpDelete("{id:guid}")]
public async Task<IActionResult> DeleteArticle(Guid articleId)
{
return await ExecuteServiceLogic(
Expand Down

0 comments on commit 8bae9cb

Please sign in to comment.