add frombody to updatecomments count api

This commit is contained in:
2024-05-07 03:43:31 +05:30
parent 2b25c55a70
commit 50911e0de7
+1 -1
View File
@@ -125,7 +125,7 @@ namespace PortBlog.API.Controllers
}
[HttpPost("UpdatePostCommentsCount")]
public async Task<ActionResult> UpdatePostCommentsCount(string blogUrl, string postSlug, int commentsCount)
public async Task<ActionResult> UpdatePostCommentsCount(string blogUrl, string postSlug, [FromBody] int commentsCount)
{
if (!await _blogRepository.PostExistsAsync(blogUrl, postSlug))
{