[GET] /api/chapter/pet/:chapterId


Request-Header

Request-Params

chapterId: string , chapter ObjectId (Primary Key)

{
	"chapterId":"1" 
}

Request - Body


Response - Body

변수 목록

{
    "status": 200,
    "success": true,
    "message": "목차별 다이어리 조회 성공",
    "data": {
        "petChapterDiary": {
            "chapterId": "60eeb3b561af927088b3e249",
            "chapter": 1,
            "chapterTitle": "최소은의 여름",
            "monthly": [
                {
                    "episodePerMonthCount": 3,
                    "month": 6,
                    "diaries": [
                        {
                            "diaryId": "60edf8ece5003a744892ce3b",
                            "title": "1번째 제목",
                            "contents": "1번쨰 일기",
                            "episode": 1,
                            "image": "asdasd",
                            "feelingCount": 2,
                            "feeling": 1,
                            "date": "14일",
                            "weekday": "수요일",
                            "kind": 2
                        },
                        {
                            "diaryId": "60edf955e5003a744892ce3c",
                            "title": "2번째 제목",
                            "contents": "2번쨰 일기",
                            "episode": 1,
                            "image": "asdasd",
                            "feelingCount": 2,
                            "feeling": 3,
                            "date": "14일",
                            "weekday": "수요일",
                            "kind": 2
                        },
                        {
                            "diaryId": "60edf95de5003a744892ce3d",
                            "title": "3번째 제목",
                            "contents": "3번쨰 일기",
                            "episode": 1,
                            "image": "asdasd",
                            "feelingCount": 2,
                            "feeling": 3,
                            "date": "1일",
                            "weekday": "목요일",
                            "kind": 2
                        }
                    ]
                }
            ]
        }
    }
}

SUCCESS

{
    "status": 200,
    "success": true,
    "message": "목차별 다이어리 조회 성공",
    "data": {
        "petChapterDiary": {
            "chapterId": "60edf5fce5003a744892ce35",
            "chapter": 1,
            "chapterTitle": "1부 목차1",
            "monthly": [
                {
                    "episodePerMonthCount": 3,
                    "month": 6,
                    "diaries": [
                        {
                            "diaryId": "60edf8ece5003a744892ce3b",
                            "title": "1번째 제목",
                            "contents": "1번쨰 일기",
                            "episode": 1,
                            "image": "asdasd",
                            "feelingCount": 2,
                            "feeling": 1,
                            "date": "14일",
                            "kind": 2
                        },
                        {
                            "diaryId": "60edf955e5003a744892ce3c",
                            "title": "2번째 제목",
                            "contents": "2번쨰 일기",
                            "episode": 1,
                            "image": "asdasd",
                            "feelingCount": 2,
                            "feeling": 1,
                            "date": "14일",
                            "kind": 2
                        },
                        {
                            "diaryId": "60edf95de5003a744892ce3d",
                            "title": "3번째 제목",
                            "contents": "3번쨰 일기",
                            "episode": 1,
                            "image": "asdasd",
                            "feelingCount": 2,
                            "feeling": 3,
                            "date": "15일",
                            "kind": 2
                        }
                    ]
                }
            ]
        }
    }
}

FAIL 1 : 잘못된 사용자 Id일 경우

{
    "status": 400,
    "success": false,
    "message": "존재하지 않는 다이어리 id입니다."
}

FAIL 2 : DB 오류, 통신 오류

{
    "status": 500,
    "success": false,
    "message": "서버 내부 오류"
}