# タスクのコメントの更新

`PATCH /api/task-comment/{taskCommentId}`

URL: https://repsona.com/ja/api/patch-task-comment-taskcommentid

自分が書いたタスクのコメントを更新します。

## パラメーター

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `taskCommentId` | path | integer | 必須 | タスクのコメントの ID です。 |

## リクエストボディ

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `doc` | body | object |  | コメント本文のリッチテキスト (ProseMirror / Tiptap の JSON) です。`doc` と `markdown` のどちらかを送ります。 |
| `markdown` | body | string |  | コメント本文の Markdown です (20,000 文字まで)。両方送った場合は `markdown` が優先されます。 |

## リクエスト

```sh
curl -X PATCH "https://<space>.repsona.com/api/task-comment/{taskCommentId}" \
  -H "Authorization: Bearer $REPSONA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "markdown": "I rewrote the hero section. Could you review it by Thursday?"
  }'
```

## レスポンス

- 200: Updated comment
- 400: Empty body
- 401: Authentication is required
- 404: Comment not found (or not yours)

## レスポンスの例

```json
{
  "comment": {
    "id": 75,
    "parentId": null,
    "comment": "I rewrote the hero section. Could you review it by Thursday?",
    "createdAt": 1793662651194,
    "updatedAt": 1793662651232,
    "user": {
      "id": 1127,
      "name": "emma",
      "fullName": "Emma Carter",
      "avatarUrl": null,
      "color": null,
      "state": "active"
    },
    "files": [],
    "deleted": false,
    "reactions": [],
    "children": []
  }
}
```
