[GET] /api/chapter/:userId


Request-Header

Request-Params

userId: string , user ObjectId (Primary Key)

{
	"userId":1 
}

Request - Body


Response - Body

변수 목록

{
        "tableContents": [
            {
                "chapterId": "60edf5d9e5003a744892ce34",
                "chapter": 0,
                "chapterTitle": "프롤로그 제목",
                "episodePerchapterCount": null
            },
            {
                "chapterId": "60edf5fce5003a744892ce35",
                "chapter": 1,
                "chapterTitle": "1부 목차1",
                "episodePerchapterCount": null
            },
            {
                "chapterId": "60edf607e5003a744892ce36",
                "chapter": 2,
                "chapterTitle": "1부 목차2",
                "episodePerchapterCount": null
            },
            {
                "chapterId": "60edf611e5003a744892ce37",
                "chapter": 3,
                "chapterTitle": "1부 목차3",
                "episodePerchapterCount": null
            },
            {
                "chapterId": "60edf619e5003a744892ce38",
                "chapter": 4,
                "chapterTitle": "1부 목차4",
                "episodePerchapterCount": null
            }
        ]
    }

SUCCESS

{
    "status": 200,
    "success": true,
    "message": "목차 리스트 조회 성공",
    "data": {
        "tableContents": [
            {
                "chapterId": "60edf5d9e5003a744892ce34",
                "chapter": 0,
                "chapterTitle": "프롤로그 제목",
                "episodePerchapterCount": null
            },
            {
                "chapterId": "60edf5fce5003a744892ce35",
                "chapter": 1,
                "chapterTitle": "1부 목차1",
                "episodePerchapterCount": null
            },
            {
                "chapterId": "60edf607e5003a744892ce36",
                "chapter": 2,
                "chapterTitle": "1부 목차2",
                "episodePerchapterCount": null
            },
            {
                "chapterId": "60edf611e5003a744892ce37",
                "chapter": 3,
                "chapterTitle": "1부 목차3",
                "episodePerchapterCount": null
            },
            {
                "chapterId": "60edf619e5003a744892ce38",
                "chapter": 4,
                "chapterTitle": "1부 목차4",
                "episodePerchapterCount": null
            }
        ]
    }
}

FAIL 1 : DB 오류, 통신 오류

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

FAIL 2 : DB 오류, 통신 오류

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