Skip to content

Commit

Permalink
#36 corrected endpoint routes
Browse files Browse the repository at this point in the history
  • Loading branch information
mgroves committed Sep 28, 2023
1 parent 8136d4f commit cff7028
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public async Task<IActionResult> CreateArticle([FromBody] CreateArticleSubmitMod
/// <response code="401">Unauthorized, likely because credentials are incorrect</response>
/// <response code="422">Article was unable to be favorited</response>
[HttpPost]
[Route("/api/article/{slug}/favorite")]
[Route("/api/articles/{slug}/favorite")]
[Authorize]
public async Task<IActionResult> FavoriteArticle(string slug)
{
Expand Down Expand Up @@ -105,7 +105,7 @@ public async Task<IActionResult> FavoriteArticle(string slug)
/// <response code="401">Unauthorized, likely because credentials are incorrect</response>
/// <response code="422">Article was unable to be unfavorited</response>
[HttpDelete]
[Route("/api/article/{slug}/favorite")]
[Route("/api/articles/{slug}/unfavorite")]
[Authorize]
public async Task<IActionResult> UnfavoriteArticle(string slug)
{
Expand Down Expand Up @@ -140,7 +140,7 @@ public async Task<IActionResult> UnfavoriteArticle(string slug)
/// <response code="200">Successful retrieval, returns the Article</response>
/// <response code="422">Article updates are invalid</response>
[HttpGet]
[Route("/api/article/{slug}")]
[Route("/api/articles/{slug}")]
[AllowAnonymous]
public async Task<IActionResult> Get(string slug)
{
Expand Down

0 comments on commit cff7028

Please sign in to comment.