-
Notifications
You must be signed in to change notification settings - Fork 0
1.2) Article Request Sample
Jong1 edited this page Nov 4, 2023
·
1 revision
Warning
모든 Request, Response가 존재하지 않을 수 있습니다
curl --location 'http://localhost:8080/article/1' \
--header 'language: KO'
{
"createAt": "2023-10-17 11:24:19",
"updateAt": "2023-10-17 11:24:19",
"boardId": 1,
"articleId": 1,
"orgArticleLanguage": "KO",
"status": "PUBLIC",
"likeCount": 0,
"contentLanguage": "KO",
"title": "제목입니다~",
"content": "킹종원이 점령했다!",
"createdUser": {
"createAt": "2023-10-18 02:43:14",
"updateAt": "2023-10-18 02:43:14",
"id": 1,
"email": "[email protected]",
"password": "$2a$10$dGUjr0mYEzEl55j8J0eJdeGHtPtIYENiQj04hVrscU37bySJl4Bla",
"nickName": "관리자",
"thumbnail": null,
"role": "ADMIN",
"oauthInfo": null,
"status": "ACTIVE",
"loginType": "DEFAULT"
},
"updatedUser": {
"createAt": "2023-10-18 02:43:14",
"updateAt": "2023-10-18 02:43:14",
"id": 1,
"email": "[email protected]",
"password": "$2a$10$dGUjr0mYEzEl55j8J0eJdeGHtPtIYENiQj04hVrscU37bySJl4Bla",
"nickName": "관리자",
"thumbnail": null,
"role": "ADMIN",
"oauthInfo": null,
"status": "ACTIVE",
"loginType": "DEFAULT"
}
}
curl --location 'http://localhost:8080/article/list/1?page=0&articleLimit=3' \
--header 'language: KO'
[
{
"createAt": "2023-10-18 02:44:04",
"updateAt": "2023-10-18 02:44:04",
"boardId": 1,
"articleId": 7,
"orgArticleLanguage": "KO",
"status": "PUBLIC",
"likeCount": 0,
"contentLanguage": "KO",
"title": "미쯔야~",
"content": "<b>사랑해 ~~~~~~~</b>",
"createdUser": {
"createAt": "2023-10-18 02:43:14",
"updateAt": "2023-10-18 02:43:14",
"id": 1,
"email": "[email protected]",
"password": "$2a$10$dGUjr0mYEzEl55j8J0eJdeGHtPtIYENiQj04hVrscU37bySJl4Bla",
"nickName": "관리자",
"thumbnail": null,
"role": "ADMIN",
"oauthInfo": null,
"status": "ACTIVE",
"loginType": "DEFAULT"
},
"updatedUser": {
"createAt": "2023-10-18 02:43:14",
"updateAt": "2023-10-18 02:43:14",
"id": 1,
"email": "[email protected]",
"password": "$2a$10$dGUjr0mYEzEl55j8J0eJdeGHtPtIYENiQj04hVrscU37bySJl4Bla",
"nickName": "관리자",
"thumbnail": null,
"role": "ADMIN",
"oauthInfo": null,
"status": "ACTIVE",
"loginType": "DEFAULT"
}
},
{
"createAt": "2023-10-17 11:26:00",
"updateAt": "2023-10-17 11:26:00",
"boardId": 1,
"articleId": 6,
"orgArticleLanguage": "KO",
"status": "PUBLIC",
"likeCount": 0,
"contentLanguage": "KO",
"title": "미쯔야~",
"content": "<b>사랑해 ~~~~~~~</b>",
"createdUser": {
"createAt": "2023-10-18 02:43:14",
"updateAt": "2023-10-18 02:43:14",
"id": 1,
"email": "[email protected]",
"password": "$2a$10$dGUjr0mYEzEl55j8J0eJdeGHtPtIYENiQj04hVrscU37bySJl4Bla",
"nickName": "관리자",
"thumbnail": null,
"role": "ADMIN",
"oauthInfo": null,
"status": "ACTIVE",
"loginType": "DEFAULT"
},
"updatedUser": {
"createAt": "2023-10-18 02:43:14",
"updateAt": "2023-10-18 02:43:14",
"id": 1,
"email": "[email protected]",
"password": "$2a$10$dGUjr0mYEzEl55j8J0eJdeGHtPtIYENiQj04hVrscU37bySJl4Bla",
"nickName": "관리자",
"thumbnail": null,
"role": "ADMIN",
"oauthInfo": null,
"status": "ACTIVE",
"loginType": "DEFAULT"
}
},
{
"createAt": "2023-10-17 11:24:41",
"updateAt": "2023-10-17 11:24:41",
"boardId": 1,
"articleId": 2,
"orgArticleLanguage": "KO",
"status": "PUBLIC",
"likeCount": 0,
"contentLanguage": "KO",
"title": "응애응애",
"content": "엉엉엉어엉엉엉",
"createdUser": {
"createAt": "2023-10-18 02:43:14",
"updateAt": "2023-10-18 02:43:14",
"id": 1,
"email": "[email protected]",
"password": "$2a$10$dGUjr0mYEzEl55j8J0eJdeGHtPtIYENiQj04hVrscU37bySJl4Bla",
"nickName": "관리자",
"thumbnail": null,
"role": "ADMIN",
"oauthInfo": null,
"status": "ACTIVE",
"loginType": "DEFAULT"
},
"updatedUser": {
"createAt": "2023-10-18 02:43:14",
"updateAt": "2023-10-18 02:43:14",
"id": 1,
"email": "[email protected]",
"password": "$2a$10$dGUjr0mYEzEl55j8J0eJdeGHtPtIYENiQj04hVrscU37bySJl4Bla",
"nickName": "관리자",
"thumbnail": null,
"role": "ADMIN",
"oauthInfo": null,
"status": "ACTIVE",
"loginType": "DEFAULT"
}
}
]
curl --location 'http://localhost:8080/article' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjk3NTk3MDIzLCJleHAiOjE2OTc2MzMwMjMsImlzcyI6Imhvb2traWxsZXIiLCJ0eXBlIjoiQUNDRVNTX1RPS0VOIiwicm9sZSI6IkFETUlOIn0.c77TIvGH4Bj4WrW7YRTAWZhrFIO9ZNuz6RS8t-Skof-mGr4tYzcb5OLHK0qOMBoVdk-f2pAoeatKtHlbMpHV2w' \
--header 'Content-Type: application/json' \
--data '{
"boardId" : 1,
"orgArticleLanguage" : "KO",
"title" : "미쯔야~",
"content" : "<b>사랑해 ~~~~~~~알라쀼~~~</b>"
}'
게시물 등록이 정상적으로 완료되었습니다.
curl --location --request PUT 'http://localhost:8080/article' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjk3NTk3MDIzLCJleHAiOjE2OTc2MzMwMjMsImlzcyI6Imhvb2traWxsZXIiLCJ0eXBlIjoiQUNDRVNTX1RPS0VOIiwicm9sZSI6IkFETUlOIn0.c77TIvGH4Bj4WrW7YRTAWZhrFIO9ZNuz6RS8t-Skof-mGr4tYzcb5OLHK0qOMBoVdk-f2pAoeatKtHlbMpHV2w' \
--header 'Content-Type: application/json' \
--data '{
"boardId" : 1,
"articleId": 8,
"orgArticleLanguage" : "KO",
"title" : "미쯔야~",
"newTitle" : "너무귀여운 우리 응애미쯔",
"content" : "<b>사랑해 ~~~~~~~</b>"
}'
게시물 수정이 정상적으로 완료되었습니다.
curl --location --request DELETE 'http://localhost:8080/article/5' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjk3NjAyMDczLCJleHAiOjE2OTc2MzgwNzMsImlzcyI6Imhvb2traWxsZXIiLCJ0eXBlIjoiQUNDRVNTX1RPS0VOIiwicm9sZSI6IkFETUlOIn0.Bc6zvNuPTQ3PVeKOVPTm1E1PrhGIXsdJ83SniWwyI2m4MVDytjMtZjZM23Acy-5filgSzfnmB3-WfR5HaNtWeQ'
{
"result": true,
"message": "게시물를 정상적으로 삭제하였습니다."
}
curl --location 'http://localhost:8080/reply/5' \
--header 'language: KO'
[
{
"createAt": "2023-10-17 12:05:00",
"updateAt": "2023-10-17 12:05:00",
"articleId": 5,
"replyId": 6,
"orgReplyLanguage": "KO",
"createUser": {
"createAt": "2023-10-18 04:18:58",
"updateAt": "2023-10-18 04:18:58",
"id": 1,
"email": "[email protected]",
"password": "$2a$10$dGUjr0mYEzEl55j8J0eJdeGHtPtIYENiQj04hVrscU37bySJl4Bla",
"nickName": "관리자",
"thumbnail": null,
"role": "ADMIN",
"oauthInfo": null,
"status": "ACTIVE",
"loginType": "DEFAULT"
},
"content": "코드싸개가 흑흑흑"
},
{
"createAt": "2023-10-17 12:05:20",
"updateAt": "2023-10-17 12:05:20",
"articleId": 5,
"replyId": 7,
"orgReplyLanguage": "KO",
"createUser": {
"createAt": "2023-10-18 04:18:58",
"updateAt": "2023-10-18 04:18:58",
"id": 1,
"email": "[email protected]",
"password": "$2a$10$dGUjr0mYEzEl55j8J0eJdeGHtPtIYENiQj04hVrscU37bySJl4Bla",
"nickName": "관리자",
"thumbnail": null,
"role": "ADMIN",
"oauthInfo": null,
"status": "ACTIVE",
"loginType": "DEFAULT"
},
"content": "뿌애애애애애애앵"
},
{
"createAt": "2023-10-17 12:05:33",
"updateAt": "2023-10-17 12:05:33",
"articleId": 5,
"replyId": 8,
"orgReplyLanguage": "EN",
"createUser": {
"createAt": "2023-10-18 04:18:58",
"updateAt": "2023-10-18 04:18:58",
"id": 1,
"email": "[email protected]",
"password": "$2a$10$dGUjr0mYEzEl55j8J0eJdeGHtPtIYENiQj04hVrscU37bySJl4Bla",
"nickName": "관리자",
"thumbnail": null,
"role": "ADMIN",
"oauthInfo": null,
"status": "ACTIVE",
"loginType": "DEFAULT"
},
"content": "나는 매우 슬프다"
}
]
curl --location 'http://localhost:8080/reply' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjk3NjAyNjAxLCJleHAiOjE2OTc2Mzg2MDEsImlzcyI6Imhvb2traWxsZXIiLCJ0eXBlIjoiQUNDRVNTX1RPS0VOIiwicm9sZSI6IkFETUlOIn0.PfiO8SmcKnbEf8JXjXJEomXqUwZjhKA8bti8nGpkbyCwpHbtUbMXb_WvHp7HRApBuSS4VTO-hdxMphGnHboPZA' \
--header 'language: ko' \
--header 'Content-Type: application/json' \
--data '{
"articleId" : 7,
"orgReplyLanguage" : "KO",
"content" : "응애응애 너무 졸린 점심이에요~~~~"
}'
curl --location --request DELETE 'http://localhost:8080/reply/9' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjk3NjAyNjAxLCJleHAiOjE2OTc2Mzg2MDEsImlzcyI6Imhvb2traWxsZXIiLCJ0eXBlIjoiQUNDRVNTX1RPS0VOIiwicm9sZSI6IkFETUlOIn0.PfiO8SmcKnbEf8JXjXJEomXqUwZjhKA8bti8nGpkbyCwpHbtUbMXb_WvHp7HRApBuSS4VTO-hdxMphGnHboPZA' \
--header 'language: ko'
삭제처리가 완료되었습니다.
curl --location 'http://localhost:8080/article/like/1' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjk3NjAyNjAxLCJleHAiOjE2OTc2Mzg2MDEsImlzcyI6Imhvb2traWxsZXIiLCJ0eXBlIjoiQUNDRVNTX1RPS0VOIiwicm9sZSI6IkFETUlOIn0.PfiO8SmcKnbEf8JXjXJEomXqUwZjhKA8bti8nGpkbyCwpHbtUbMXb_WvHp7HRApBuSS4VTO-hdxMphGnHboPZA' \
--header 'language: ko'
curl --location 'http://localhost:8080/article/like/2' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjk3NjAyNjAxLCJleHAiOjE2OTc2Mzg2MDEsImlzcyI6Imhvb2traWxsZXIiLCJ0eXBlIjoiQUNDRVNTX1RPS0VOIiwicm9sZSI6IkFETUlOIn0.PfiO8SmcKnbEf8JXjXJEomXqUwZjhKA8bti8nGpkbyCwpHbtUbMXb_WvHp7HRApBuSS4VTO-hdxMphGnHboPZA' \
--header 'language: ko'
{
"result": false,
"message": "게시물에 좋아요를 누르지 않았습니다."
}
{
"result": true,
"message": "이미 게시물에 좋아요를 누르셨습니다."
}
curl --location --request POST 'http://localhost:8080/article/like/1' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjk3NjAzNTQ1LCJleHAiOjE2OTc2Mzk1NDUsImlzcyI6Imhvb2traWxsZXIiLCJ0eXBlIjoiQUNDRVNTX1RPS0VOIiwicm9sZSI6IkFETUlOIn0.RjqfcRyI9JzgEDqOxWC9xk_ZBns9skxns3V0F9qdLpjl7mTyjl5CyWjQ5xa7MueXYgq2V3TFTiYqaBttizAIeA' \
--header 'language: KO'
ADD_SUCCESS
or
DEL_SUCCESS
footertest