-
Notifications
You must be signed in to change notification settings - Fork 0
의원 댓글 관련 API
sujin edited this page Feb 25, 2019
·
12 revisions
[GET] ~/comment/:legi_id
[GET] ~/comment/100014
메소드 | 파라미터명 | 설명 |
---|---|---|
header | Content-Type | application/json |
params | legi_id | 의원 idx |
{
"status": 3200,
"success": true,
"message": "댓글 읽기 성공",
"data": [
{
"idx": 2,
"legi_idx": 100014,
"writer": 4,
"content": "test1",
"writetime": "2019-02-24T06:46:07.000Z"
}
]
}
[POST] ~/comment
[POST] ~/comment
메소드 | 파라미터명 | 설명 |
---|---|---|
header | Content-Type | application/json |
header | token | user token |
body | legi_id | 의원 idx |
body | content | 댓글 내용 |
{
"status": 3201,
"success": true,
"message": "댓글 성공"
}
[PUT] ~/comment
[PUT] ~/comment
메소드 | 파라미터명 | 설명 |
---|---|---|
header | Content-Type | application/json |
header | token | user token |
body | comment_idx | 댓글 idx |
body | writer | 작성자 idx |
body | content | 댓글 내용 |
{
"status": 3202,
"success": true,
"message": "댓글 수정 성공"
}
[DELETE] ~/comment
[DELETE] ~/comment
메소드 | 파라미터명 | 설명 |
---|---|---|
header | Content-Type | application/json |
header | token | user token (GET에는 필요 없음) |
body | comment_idx | 댓글 idx |
body | writer | 작성자 idx |
{
"status": 3203,
"success": true,
"message": "댓글 삭제 성공"
}
{
"status": "토큰값이 유효하지 않습니다.",
"success": false,
"message": null,
"data": null
}