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


Request-Header

Request-Params

userId: string , User ObjectId (Primary Key)

{
	"userId":"1" 
}

Request - Body

Response - Body


{
        "firstPartMainPage": {
            "title": "우당탕탕똥꼬들",
            "bookImg": "asdasd",
            "diary": {
                "chapter": 1,
                "episode": 1,
                "_id": "60eedc16ed61100340b708cf",
                "title": "행복한 나날들",
                "contents": "반려동물과의 일상을 생생하게 기록해보세요",
                "date": "2021.07.01"
            },
            "tableContents": [
                {
                    "chapterId": "60edf5d9e5003a744892ce34",
                    "chapterTitle": "프롤로그 제목",
                    "chapter": 0,
                    "episodePerchapterCount": 0
                },
                {
                    "chapterId": "60eeb3b561af927088b3e247",
                    "chapterTitle": "최소은의 봄",
                    "chapter": 1,
                    "episodePerchapterCount": 0
                },
                {
                    "chapterId": "60eeb3b561af927088b3e249",
                    "chapterTitle": "최소은의 여름",
                    "chapter": 1,
                    "episodePerchapterCount": 3
                },
                {
                    "chapterId": "60eeb3b561af927088b3e24b",
                    "chapterTitle": "최소은의 가을",
                    "chapter": 1,
                    "episodePerchapterCount": 1
                },
                {
                    "chapterId": "60eeb3b561af927088b3e24d",
                    "chapterTitle": "최소은의 겨울",
                    "chapter": 1,
                    "episodePerchapterCount": 0
                },
                {
                    "chapterId": "60eef51b4465cc5830304397",
                    "chapterTitle": "asdfsadfsdf",
                    "chapter": 10,
                    "episodePerchapterCount": 0
                }
            ],
            "secondPartBook": {
                "userId": "60edf1b7a95c4a2a8c64c6ba",
                "bookImg": "asdasd",
                "author": "최소은",
                "date": "2021.07.14"
            },
            "nextEpisode": 2
        }
    }

변수 목록

SUCCESS

{
    "status": 200,
    "success": true,
    "message": "1부 메인뷰 불러오기 성공",
    "data": {
        "firstPartMainPage": {
            "title": "우당탕탕똥꼬들",
            "bookImg": "asdasd",
            "diary": {
                "chapter": 1,
                "episode": 1,
                "_id": "60eedc16ed61100340b708cf",
                "title": "행복한 나날들",
                "contents": "반려동물과의 일상을 생생하게 기록해보세요",
                "date": "2021.07.01"
            },
            "tableContents": [
                {
                    "chapterId": "60edf5d9e5003a744892ce34",
                    "chapterTitle": "프롤로그 제목",
                    "chapter": 0,
                    "episodePerchapterCount": 0
                },
                {
                    "chapterId": "60eeb3b561af927088b3e247",
                    "chapterTitle": "최소은의 봄",
                    "chapter": 1,
                    "episodePerchapterCount": 0
                },
                {
                    "chapterId": "60eeb3b561af927088b3e249",
                    "chapterTitle": "최소은의 여름",
                    "chapter": 1,
                    "episodePerchapterCount": 3
                },
                {
                    "chapterId": "60eeb3b561af927088b3e24b",
                    "chapterTitle": "최소은의 가을",
                    "chapter": 1,
                    "episodePerchapterCount": 1
                },
                {
                    "chapterId": "60eeb3b561af927088b3e24d",
                    "chapterTitle": "최소은의 겨울",
                    "chapter": 1,
                    "episodePerchapterCount": 0
                },
                {
                    "chapterId": "60eef51b4465cc5830304397",
                    "chapterTitle": "asdfsadfsdf",
                    "chapter": 10,
                    "episodePerchapterCount": 0
                }
            ],
            "secondPartBook": {
                "userId": "60edf1b7a95c4a2a8c64c6ba",
                "bookImg": "asdasd",
                "author": "최소은",
                "date": "2021.07.14"
            },
            "nextEpisode": 2
        }
    }
}

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

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

FAIL 2 : DB 오류, 통신 오류