コード例 #1
0
 public async Task <int> UpdateAsync(string userId, string postId, PostLikedRequestViewModel postLikedRequestViewModel)
 {
     return(await _postRepository.UpdateAsync(_identityService.GetApplicationId(), userId, postId, postLikedRequestViewModel.Liked));
 }
コード例 #2
0
        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());
        }