[GET] /api/secondPart/main/:userId


Request-Header

Request-Params

userId: string , User ObjectId (Primary Key)

{
	"userId":1 
}

Response - Body

{
        "secondPartMainPage": {
            "title": "우당탕탕똥꼬들",
            "bookImg": "asdasd",
            "diary": {
                "episode": 3,
                "title": "2부 일기3",
                "contents": "2부 일기1내용3",
                "date": "2021.07.16",
                "_id": "60edfdcce5003a744892ce4b",
                "chapter": 1
            },
            "tableContents": [
                {
                    "chapter": 0,
                    "chapterTitle": "작가의 말",
                    "episodePerChapterCount": 0,
                    "chapterId": "60edfb11e5003a744892ce44"
                },
                {
                    "chapter": 1,
                    "chapterTitle": "2부 목차1",
                    "episodePerChapterCount": 3,
                    "chapterId": "60edfb36e5003a744892ce45"
                },
                {
                    "chapter": 2,
                    "chapterTitle": "2부 목차2",
                    "episodePerChapterCount": 0,
                    "chapterId": "60edfb3fe5003a744892ce46"
                },
                {
                    "chapter": 3,
                    "chapterTitle": "2부 목차3",
                    "episodePerChapterCount": 0,
                    "chapterId": "60edfb46e5003a744892ce47"
                },
                {
                    "chapter": 4,
                    "chapterTitle": "코봉의 봄",
                    "episodePerChapterCount": 1,
                    "chapterId": "60edfb51e5003a744892ce48"
                }
            ],
            "firstPartBook": {
                "userId": "60edf1b7a95c4a2a8c64c6b9",
                "bookImg": "asdasd",
                "author": "최소은",
                "date": "2021.07.14"
            },
            "nextEpisode": 4
        }
    }

변수 목록

Status


SUCCESS

{
    "status": 200,
    "message": "2부 홈 화면",
    "data": 
{
        "secondPartMainPage": {
            "title": "우당탕탕똥꼬들",
            "bookImg": "asdasd",
            "diary": {
                "episode": 3,
                "title": "2부 일기3",
                "contents": "2부 일기1내용3",
                "date": "2021.07.16",
                "_id": "60edfdcce5003a744892ce4b",
                "chapter": 1
            },
            "tableContents": [
                {
                    "chapter": 0,
                    "chapterTitle": "작가의 말",
                    "episodePerChapterCount": 0,
                    "chapterId": "60edfb11e5003a744892ce44"
                },
                {
                    "chapter": 1,
                    "chapterTitle": "2부 목차1",
                    "episodePerChapterCount": 3,
                    "chapterId": "60edfb36e5003a744892ce45"
                },
                {
                    "chapter": 2,
                    "chapterTitle": "2부 목차2",
                    "episodePerChapterCount": 0,
                    "chapterId": "60edfb3fe5003a744892ce46"
                },
                {
                    "chapter": 3,
                    "chapterTitle": "2부 목차3",
                    "episodePerChapterCount": 0,
                    "chapterId": "60edfb46e5003a744892ce47"
                },
                {
                    "chapter": 4,
                    "chapterTitle": "코봉의 봄",
                    "episodePerChapterCount": 1,
                    "chapterId": "60edfb51e5003a744892ce48"
                }
            ],
            "firstPartBook": {
                "userId": "60edf1b7a95c4a2a8c64c6b9",
                "bookImg": "asdasd",
                "author": "최소은",
                "date": "2021.07.14"
            },
            "nextEpisode": 4
        }
    }
}

FAIL : DB 오류, 통신 오류

{
  "status":500,
  "message":"2부 홈 불러오기 실패"
}