-
Notifications
You must be signed in to change notification settings - Fork 0
[PUT] Bucket 수정
MoonAyoung edited this page Jun 26, 2021
·
6 revisions
메소드 | 경로 | 설명 |
---|---|---|
PUT | /api/v2/buckets | 버킷 수정 |

{
"Content-Type": "application/json",
"token": "[토큰]"
}
수정 내용과 함께 전체 데이터를 요청 바디에 담습니다.
{
"bucketName": "[버킷 이름]",
"bucketState": 2,
"categoryId": 2,
"content": "[버킷 내용]",
"imageList": [
"https://~.png"
],
"endDate": "2021-06-01",
"tagList": [
"태그1",
"태그2",
"태그3"
]
}
Key | 설명 | 데이터 |
---|---|---|
endDate | "yyyy-MM-dd" 포맷만 가능 | ex) 2021-07-03 |
bucketState | 2 이상 5 이하의 bucketState만 유효합니다. | 2(예정), 3(진행 중), 4(완료), 5(실패) |
categoryId | 2 이상 10 이하의 categoryId만 유효합니다. | 2(여행), 3(취미), 4(소유), 5(재정), 6(건강) 7(목표), 8(조직), 9(봉사), 10(기타) |
{
"status": 200,
"message": "버킷 수정 성공입니다.",
"data": null
}
- 잘못된 날짜 포맷
{
"message": " Invalid Type Value",
"status": 400,
"errors": [],
"code": "C005"
}
- 버킷 제목 빈 문자열인 경우
{
"message": " Invalid Input Value",
"status": 400,
"errors": [
{
"field": "bucketName",
"value": "",
"reason": "버킷 제목 작성 필수입니다."
}
],
"code": "C001"
}
- 잘못된 bucketState 2 이상 4 이하의 bucketState만 유효합니다.
{
"message": " Invalid Input Value",
"status": 400,
"errors": [
{
"field": "bucketState",
"value": "1",
"reason": "유효한 버킷 state가 아닙니다."
}
],
"code": "C001"
}
- 잘못된 categoryId 2 이상 10 이하의 categoryId만 유효합니다.
{
"message": " Invalid Input Value",
"status": 400,
"errors": [
{
"field": "categoryId",
"value": "1",
"reason": "유효한 카테고리 ID가 아닙니다."
}
],
"code": "C001"
}
- 잘못된 토큰
{
"message": "JWT가 없거나 잘못된 값 입니다",
"status": 401,
"errors": [],
"code": "J001"
}
- 서버 에러
{
"message": "User is not Exist",
"status": 400,
"errors": [],
"code": "M003"
}