COMMENT API
κ²μλ¬Ό λκΈ μ‘°ν
GET
https://Yeollin-jib/comment/:postId
κ²μλ¬Ό μμ΄λλ‘ μ 체 λκΈ μ‘°ν
Path Parameters
Name
Type
Description
postId*
Integer
{
"data": [
{
"id": 1, // λ°μ΄ν° λ² μ΄μ€μ μ μ₯λλ λκΈ μμ΄λ
"userId": 4, // λκΈμ μμ±ν μ μ μ μμ΄λ
"postId": 4, // κ²μκΈμ μμ΄λ
"contents": "μλ
",
"createdAt": "2021-10-27T03:39:33.000Z",
"updateTimestamp": "2021-10-27T03:39:33.000Z",
"users": [
{
"nickname": "κΉκΉh",
"imagePath": "IMG_7429(1636134049182).jpg"
}
]
},
{
"id": 3, // λ°μ΄ν° λ² μ΄μ€μ μ μ₯λλ λκΈ μμ΄λ
"userId": 4, // λκΈμ μμ±ν μ μ μ μμ΄λ
"postId": 4, // κ²μκΈμ μμ΄λ
"contents": "μλ
",
"createdAt": "2021-10-27T03:43:24.000Z",
"updateTimestamp": "2021-10-27T03:43:24.000Z",
"users": [
{
"nickname": "suzysoyeonghwang",
"imagePath": "IMG_7429(1636134049182).jpg"
}
]
},
{
"id": 4, // λ°μ΄ν° λ² μ΄μ€μ μ μ₯λλ λκΈ μμ΄λ
"userId": 4, // λκΈμ μμ±ν μ μ μ μμ΄λ
"postId": 4, // κ²μκΈμ μμ΄λ
"contents": "μλ
2",
"createdAt": "2021-10-27T03:56:01.000Z",
"updateTimestamp": "2021-10-27T04:36:32.000Z",
"users": [
{
"nickname": "κΉμ½λ©",
"imagePath": "IMG_7429(1636134049182).jpg"
}
]
}
],
"message": "λκΈμ΄ μ±κ³΅μ μΌλ‘ μ‘°νλμμ΅λλ€."
}
λ΄κ° μ΄ λκΈ μ‘°ν
GET
https://Yeollin-jib/comment/me
λ΄κ° μ΄ μ 체 λκΈ μ‘°ν
Headers
Name
Type
Description
Authorization*
String
accessToken
{
"data": [
{
"postId": 6,
"contents": "μμλ
λ
",
"post": {
"title": "μ λͺ©"
"dueDate": "1"
}
},
{
"postId": 6,
"contents": "μλ
",
"post": {
"title": "1",
"dueDate": "1"
}
},
{
"postId": 6,
"contents": "μλ―Όλ!!!!!",
"post": {
"title": "1",
"dueDate": "1"
}
},
{
"postId": 7,
"contents": "μλ―Όλ!!!!!",
"post": {
"title": "dd",
"dueDate": "2021-11-1013:29"
}
},
{
"postId": 8,
"contents": "μλ―Όλ!!!!!",
"post": {
"title": "dd22",
"dueDate": "2021-11-1013:29"
}
},
{
"postId": 9,
"contents": "μλ―Όλ!!!!!",
"post": {
"title": "dd22",
"dueDate": "2021-11-1013:29"
}
}
],
"message": "λ΄κ° μ΄ λκΈμ΄ μ±κ³΅μ μΌλ‘ μ‘°νλμμ΅λλ€."
}
κ²μλ¬Ό λκΈ μ°κΈ°
POST
https://Yeollin-jib/comment/:postId
κ²μλ¬Ό μμ΄λλ₯Ό μ λ ₯ν΄μ κ·Έ κ²μλ¬Όμ λκΈ μμ±
Path Parameters
Name
Type
Description
postId*
Integer
Headers
Name
Type
Description
Authorization*
String
Request Body
Name
Type
Description
contents*
String
{
"data": {
"id": 7, // λ°μ΄ν° λ² μ΄μ€μ μ μ₯λλ λκΈ μμ΄λ
"userId": 4, // λκΈμ μμ±ν μ μ μ μμ΄λ
"postId": "2", // κ²μκΈμ μμ΄λ
"contents": "μλ
",
"updateTimestamp": "2021-10-27T03:59:03.441Z",
"createdAt": "2021-10-27T03:59:03.441Z"
},
"nickname": {
"nickname": "κΉμ½λ©"
},
"message": "λκΈμ΄ μ±κ³΅μ μΌλ‘ μ
λ ₯λμμ΅λλ€."
}
κ²μλ¬Ό λκΈ μμ
PATCH
https://Yeollin-jib/comment/:commentId
λκΈ μμ΄λλ‘ λκΈ μμ
Path Parameters
Name
Type
Description
commentId*
Integer
Headers
Name
Type
Description
Authorization*
String
Request Body
Name
Type
Description
contents*
String
{
"comment": {
"id": "2", // λ°μ΄ν° λ² μ΄μ€μ μ μ₯λ λκΈ μμ΄λ
"userId": 4, // λκΈμ μμ±ν μ μ μ μμ΄λ
"postId": 1, // κ²μκΈμ μμ΄λ
"contents": "μλ
2"
},
"nickname": {
"nickname": "κΉμ½λ©"
},
"message": "λκΈμ΄ μ±κ³΅μ μΌλ‘ μμ λμμ΅λλ€."
}
κ²μλ¬Ό λκΈ μμ
DELETE
https://Yeollin-jib/comment/:commentId
λκΈ μμ΄λλ‘ λκΈ μμ
Path Parameters
Name
Type
Description
commentId*
Integer
Headers
Name
Type
Description
Authorization*
String
{
"message": "λκΈμ΄ μ±κ³΅μ μΌλ‘ μμ λμμ΅λλ€."
}
Last updated