Beispiel #1
0
        public async Task <IActionResult> GetAsyncFromPost(string postId, Guid commentId)
        {
            try
            {
                var comment = await _postCommentService.GetAsyncFromPost(postId, commentId);

                return(Json(comment));
            }
            catch (Exception e)
            {
                _logger.LogError($"Returning exception: {e.Message}");
                return(Json(new ExceptionDto
                {
                    Error = e.Message
                }));
            }
        }