-
Notifications
You must be signed in to change notification settings - Fork 5
Comment API
Kwon soon won edited this page Nov 3, 2020
·
4 revisions
| METHOD | URL | DESCRIPITION | |
|---|---|---|---|
| GET | /api/comment/:issueId | comment list를 가져오기 | comment list api |
| POST | /api/comment | comment를 생성 | comment create api |
| PATCH | /api/comment | comment 수정하기 | comment update api |
| DELETE | /api/comment/:commentId | comment 삭제하기 | comment delete api |
GET /api/comment/:issueId[
{
id: 1,
isFirst: false,
content: 'update2',
createdAt: '2020-11-02T08:40:07.000Z',
updatedAt: '2020-11-02T14:12:56.000Z',
emojis: [
{
id: 1,
name: 'airplane',
imageUrl: 'https://homepages.cae.wisc.edu/~ece533/images/airplane.png',
commentEmoji: {
createdAt: '2020-11-02T08:40:07.000Z',
updatedAt: '2020-11-02T08:40:07.000Z',
emojiId: 1,
commentId: 1,
},
},
],
creater: {
id: 1,
email: 'kyle@example.com',
imageUrl: null,
name: null,
createdAt: '2020-11-02T08:40:07.000Z',
updatedAt: '2020-11-02T08:40:07.000Z',
},
},
]
POST /api/comment| NAME | TYPE | DESCRIPITION | REQUIRED |
|---|---|---|---|
| isFirst | Boolean | 코멘트 status | O |
| content | String | 코멘트 내용 | O |
| createrId | Int | 생성자 ID | O |
| issueId | Int | 이슈 ID | O |
이모지 추가해야 해용
{
"isFirst": true,
"content": "create",
"createrId": 1,
"issueId": 1
}
{
"id": 6,
"isFirst": true,
"content": "create",
"createrId": 1,
"issueId": 1,
"updatedAt": "2020-11-03T06:51:41.207Z",
"createdAt": "2020-11-03T06:51:41.207Z"
}
추후 결정
PATCH /api/comment| NAME | TYPE | DESCRIPITION | REQUIRED |
|---|---|---|---|
| commentId | Int | commentID | O |
| content | String | comment 내용 | O |
이모지 추가해야 해용
{
"commentId": 1,
"content": "content example"
}
1
DELETE /api/comment/:commentId1