Skip to content

User posts

김은우 edited this page May 25, 2020 · 2 revisions

유저 게시물 받아오기

Content-type : application/json

POST /api/user/:id/posts

Request

{
	"id":2,
}

Response

Success : 200

{
        "id": 2,
        "content": "ㅎㅎ",
        "isDeleted": false,
        "isBlocked": false,
        "createdAt": "2020-04-11T11:32:44.000Z",
        "updatedAt": "2020-04-11T11:32:44.000Z",
        "UserId": 2,
        "RetweetId": null,
        "User": {
            "id": 2,
            "nickname": "aaa",
            "Image": null
        },
        "Images": [],
        "Likers": [
            {
                "id": 1,
                "Like": {
                    "createdAt": "2020-04-11T11:33:48.000Z",
                    "updatedAt": "2020-04-11T11:33:48.000Z",
                    "PostId": 2,
                    "UserId": 1
                }
            }
        ],
        "Retweet": null,
        "Comments": [
            {
                "id": 4,
                "content": "ㄹㄹ",
                "isDeleted": false,
                "createdAt": "2020-04-11T11:32:52.000Z",
                "updatedAt": "2020-04-11T11:32:52.000Z",
                "UserId": 2,
                "PostId": 2,
                "ParentId": null,
                "User": {
                    "id": 2,
                    "nickname": "aaa"
                }
            },
            {
                "id": 5,
                "content": "ㅅㅅㅅ",
                "isDeleted": false,
                "createdAt": "2020-04-11T11:32:55.000Z",
                "updatedAt": "2020-04-11T11:32:55.000Z",
                "UserId": 2,
                "PostId": 2,
                "ParentId": null,
                "User": {
                    "id": 2,
                    "nickname": "aaa"
                }
            },
            {
                "id": 6,
                "content": "ㄱㄱㄱ",
                "isDeleted": false,
                "createdAt": "2020-04-11T11:32:59.000Z",
                "updatedAt": "2020-04-11T11:32:59.000Z",
                "UserId": 2,
                "PostId": 2,
                "ParentId": null,
                "User": {
                    "id": 2,
                    "nickname": "aaa"
                }
            }
        ]
    },
    {
        "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"
                }
            },
            {
                "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"
                }
            },
            {
                "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"
                }
            }
        ]
}
Clone this wiki locally