Major board replies - Gachon-P-project/Back GitHub Wiki
κ²μλ¬Όμ λκΈμ μμ±, μ‘°ν, μμ , μμ νλ λ‘μ§
- λκΈ μμ±
- λλκΈ μμ±
- μ 체 λκΈ μ‘°ν
λκΈ μμ λλκΈ μμ - λκΈ μμ
- λλκΈ μμ
-
URL
/replies/major
-
Method
POST
-
Data Params
μ΄λ¦ | μ€λͺ | νμ | νμ |
---|---|---|---|
user_no | μ¬μ©μ νλ² | Int | O |
post_no | κ²μκΈ λ²νΈ | Int | O |
reply_contents | λκΈ λ΄μ© | VARCHAR(150) | O |
wrt_date | κ²μκΈ μμ±μΌ | VARCHAR | O |
- Sample Call
http://localhost:17394/replies/major
- Data Input Exaple:
{
"user_no": "201739423",
"post_no": "519",
"reply_contents" : "첫 λ²μ§Έ λκΈμ
λλ€!!"
}
-
Success Response
Code: 200
Content:
{
"fieldCount": 0,
"affectedRows": 1,
"insertId": 4,
"serverStatus": 2,
"warningCount": 0,
"message": "",
"protocol41": true,
"changedRows": 0
}
-
Error Response
Code: 400 BAD REQUEST
Content: { error : "null κ°μ΄ μ‘΄μ¬ν©λλ€." }
-
URL
/replies/major/reply
-
Method
POST
-
Data Params
μ΄λ¦ | μ€λͺ | νμ | νμ |
---|---|---|---|
user_no | μ¬μ©μ νλ² | Int | O |
post_no | κ²μκΈ λ²νΈ | Int | O |
reply_no | λκΈ λ²νΈ | Int | O |
reply_contents | λκΈ λ΄μ© | VARCHAR(150) | O |
wrt_date | κ²μκΈ μμ±μΌ | VARCHAR | O |
depth | λκΈ/λ΅κΈ μ¬λΆ(0:λκΈ 1:λ΅κΈ) | Int | O |
bundle_id | κ·Έλ£Ήμμ΄λ(λκΈκ³Ό λλκΈμ 그루ννλ κ°) | Int | O |
board_flag | κ²μν μ’ λ₯(0:μμ κ²μν 1:μμ κ²μν 2:νκ³Όκ²μν) | Int | O |
- Sample Call
http://localhost:17394/replies/major/reply
- Data Input Exaple:
{
"user_no": "201739423",
"post_no": "519",
"reply_no": "173",
"reply_contents": "첫 λ²μ§Έ λλκΈμ
λλ€!!"
}
-
Success Response
Code: 200
Content:
{
"fieldCount": 0,
"affectedRows": 1,
"insertId": 4,
"serverStatus": 2,
"warningCount": 0,
"message": "",
"protocol41": true,
"changedRows": 0
}
-
Error Response
Code: 400 BAD REQUEST
Content: { error : "null κ°μ΄ μ‘΄μ¬ν©λλ€." }
-
URL
/replies/major/:postNo
-
Method
GET
-
URL Params
μ΄λ¦ | μ€λͺ | νμ | νμ |
---|---|---|---|
post_no | κ²μκΈ λ²νΈ | Int | O |
- Sample Call
http://localhost:17394/replies/major/519
-
Success Response
Code: 200
Content:
[
{
"reply_no": 173,
"reply_contents": "첫 λ²μ§Έ λκΈμ
λλ€!!",
"wrt_date": "2021-1-10 0:10:25",
"user_no": 201739423,
"post_no": 519,
"depth": 0,
"bundle_id": 1,
"is_deleted": 0,
"nickname": "dddddun"
}
]
-
Error Response
Code: 400 BAD REQUEST
Content: { error : "null κ°μ΄ μ‘΄μ¬ν©λλ€." }
-
URL
/reply/update/:id
-
Method
PUT
-
URL Params
μ΄λ¦ | μ€λͺ | νμ | νμ |
---|---|---|---|
id | λκΈ λ²νΈ(μ 체 λκΈ μ‘°ν μ reply_noλ‘ μ λ¬λλ κ°) | Int | O |
- Data Params
μ΄λ¦ | μ€λͺ | νμ | νμ |
---|---|---|---|
reply_contents | λκΈ λ΄μ© | VARCHAR(150) | O |
- Sample Call
http://localhost:17394/reply/update/3
- Data Input Exaple:
{
"reply_contents" : "λκΈ μμ ν
μ€νΈ!!"
}
-
Success Response
Code: 200
Content:
{
"fieldCount": 0,
"affectedRows": 0,
"insertId": 0,
"serverStatus": 2,
"warningCount": 0,
"message": "(Rows matched: 0 Changed: 0 Warnings: 0",
"protocol41": true,
"changedRows": 0
}
-
Error Response
Code: 400 BAD REQUEST
Content: { error : "null κ°μ΄ μ‘΄μ¬ν©λλ€." }
-
URL
/reply/update/reply/:id
-
Method
PUT
-
URL Params
μ΄λ¦ | μ€λͺ | νμ | νμ |
---|---|---|---|
id | λκΈ λ²νΈ(μ 체 λκΈ μ‘°ν μ reply_noλ‘ μ λ¬λλ κ°) | Int | O |
- Data Params
μ΄λ¦ | μ€λͺ | νμ | νμ |
---|---|---|---|
reply_contents | λκΈ λ΄μ© | VARCHAR(150) | O |
- Sample Call
http://localhost:17394/reply/update/reply/3
- Data Input Exaple:
{
"reply_contents" : "λλκΈ μμ ν
μ€νΈ!!"
}
-
Success Response
Code: 200
Content:
{
"fieldCount": 0,
"affectedRows": 0,
"insertId": 0,
"serverStatus": 2,
"warningCount": 0,
"message": "(Rows matched: 0 Changed: 0 Warnings: 0",
"protocol41": true,
"changedRows": 0
}
-
Error Response
Code: 400 BAD REQUEST
Content: { error : "null κ°μ΄ μ‘΄μ¬ν©λλ€." }
-
URL
/replies/major
-
Method
DELETE
-
Data Params
μ΄λ¦ | μ€λͺ | νμ | νμ |
---|---|---|---|
bundle_id | κ·Έλ£Ήμμ΄λ(λκΈκ³Ό λλκΈμ 그루ννλ κ°) | Int | O |
- Data Input Exaple:
{
"bundle_id": "173"
}
- Sample Call
http://localhost:17394/replies/major
-
Success Response
Code: 200
Content:
{
"fieldCount": 0,
"affectedRows": 1,
"insertId": 0,
"serverStatus": 2,
"warningCount": 0,
"message": "",
"protocol41": true,
"changedRows": 0
}
-
Error Response
Code: 400 BAD REQUEST
Content: { error : "null κ°μ΄ μ‘΄μ¬ν©λλ€." }
-
URL
/replies/major/reply
-
Method
DELETE
-
Data Params
μ΄λ¦ | μ€λͺ | νμ | νμ |
---|---|---|---|
reply_no | λκΈ λ²νΈ | Int | O |
- Data Input Exaple:
{
"reply_no": "174"
}
- Sample Call
http://localhost:17394/replies/major/reply
-
Success Response
Code: 200
Content:
{
"fieldCount": 0,
"affectedRows": 1,
"insertId": 0,
"serverStatus": 2,
"warningCount": 0,
"message": "",
"protocol41": true,
"changedRows": 0
}
-
Error Response
Code: 400 BAD REQUEST
Content: { error : "null κ°μ΄ μ‘΄μ¬ν©λλ€." }