public async Task <IActionResult> PostCommentsAsync(string taskId, [FromBody] Comment comment) { try { comment.UserId = UserId; await _taskService.AddCommentAsync(taskId, comment).ConfigureAwait(false); return(Ok()); } catch (NoDatabaseObjectFoundException e) { return(NotFound(e.Message)); } catch (DatabaseUpdateException e) { return(BadRequest(e.Message)); } }