public async Task <IActionResult> Create(CreateCommentDto input) { var token = GetToken(); var userId = LoginHelper.GetClaim(token, "UserId"); input.UserId = Guid.Parse(userId); var result = await _commentAppService.CreateComment(input); bool status = result.Id != Guid.Empty; return(Ok(new{ status })); }
public async Task <IActionResult> CreateComment(CreateCommentDto input) { try { await _commentAppService.CreateComment(input); return(Ok()); } catch (Exception e) { Console.WriteLine(e); throw; } }