public async Task <IActionResult> GetPostDetailAsync(int id) { var post = await _postService.GetAsync(id); if (post.IsDeleted || post == null) { return(StatusCode(404)); } var postDetailsViewModel = PostMapper.ConvertToPostDetailsViewModel(post); return(Ok(postDetailsViewModel)); }