Skip to content
김은우 edited this page May 25, 2020 · 1 revision

메인 페이지

Content-type : application/json

GET /api/posts

Request

{
	"lastId": 2,
        "limit": 10
}

Response

Success : 200

{
        "id": 1,
        "content": "gdgd",
        "isDeleted": false,
        "isBlocked": false,
        "createdAt": "2020-04-11T11:32:23.000Z",
        "updatedAt": "2020-04-11T11:32:23.000Z",
        "UserId": 2,
        "RetweetId": null,
        "User": {
            "id": 2,
            "nickname": "aaa",
            "Image": null
        },
        "Images": [],
        "Likers": [],
        "Retweet": null,
        "Comments": [
            {
                "id": 1,
                "content": "ㅎㅇㅎㅇ",
                "isDeleted": false,
                "createdAt": "2020-04-11T11:32:31.000Z",
                "updatedAt": "2020-04-11T11:32:31.000Z",
                "UserId": 2,
                "PostId": 1,
                "ParentId": null,
                "User": {
                    "id": 2,
                    "nickname": "aaa",
                    "Image": null
                },
                "commentLikers": [
                    {
                        "id": 1,
                        "commentLike": {
                            "createdAt": "2020-04-11T11:48:18.000Z",
                            "updatedAt": "2020-04-11T11:48:18.000Z",
                            "CommentId": 1,
                            "UserId": 1
                        }
                    },
                    {
                        "id": 3,
                        "commentLike": {
                            "createdAt": "2020-04-11T12:17:00.000Z",
                            "updatedAt": "2020-04-11T12:17:00.000Z",
                            "CommentId": 1,
                            "UserId": 3
                        }
                    }
                ],
                "ReComment": []
            },
            {
                "id": 2,
                "content": "ㅎㅇㅎㅇㅇㅇ",
                "isDeleted": false,
                "createdAt": "2020-04-11T11:32:38.000Z",
                "updatedAt": "2020-04-11T11:32:38.000Z",
                "UserId": 2,
                "PostId": 1,
                "ParentId": null,
                "User": {
                    "id": 2,
                    "nickname": "aaa",
                    "Image": null
                },
                "commentLikers": [
                    {
                        "id": 1,
                        "commentLike": {
                            "createdAt": "2020-04-11T12:11:53.000Z",
                            "updatedAt": "2020-04-11T12:11:53.000Z",
                            "CommentId": 2,
                            "UserId": 1
                        }
                    }
                ],
                "ReComment": []
            },
            {
                "id": 3,
                "content": "ㄱㄱㄱ",
                "isDeleted": false,
                "createdAt": "2020-04-11T11:32:41.000Z",
                "updatedAt": "2020-04-11T11:32:41.000Z",
                "UserId": 2,
                "PostId": 1,
                "ParentId": null,
                "User": {
                    "id": 2,
                    "nickname": "aaa",
                    "Image": null
                },
                "commentLikers": [
                    {
                        "id": 1,
                        "commentLike": {
                            "createdAt": "2020-04-11T12:13:30.000Z",
                            "updatedAt": "2020-04-11T12:13:30.000Z",
                            "CommentId": 3,
                            "UserId": 1
                        }
                    }
                ],
                "ReComment": []
            }
        ]
}
Clone this wiki locally