public async Task <int> UpdateAsync(string userId, string postId, PostLikedRequestViewModel postLikedRequestViewModel) { return(await _postRepository.UpdateAsync(_identityService.GetApplicationId(), userId, postId, postLikedRequestViewModel.Liked)); }
public async Task <ActionResult> UpdateAsync([FromRoute] string userId, [FromRoute] string postId, PostLikedRequestViewModel postLikedRequestViewModel) { var result = await _likeService.UpdateAsync(userId, postId, postLikedRequestViewModel); if (result < 1) { return(NotFound()); } return(NoContent()); }