Projects > Comments


Index

GET : /api/designnest/v1/projects/{projectID}/comments

projectID : the ID of the current project

Response :

{
    "code" : 1 ,
    "message" : "" ,
    "data" : {
        "list" : {
            "paginate" : {
                "total" : 0 ,
                "has_more_page" : 0 / 1
            } ,
            "data" : [
                {
                    "parent": {
                        "id": 0,
                        "created_time": "",
                        "content": "",
                        "user": {
                            "name": "",
                            "avatar": "",
                            "is_designer": 0
                        }
                    },
                    "children" : [
                        {
                            "id": 0,
                            "created_time": "",
                            "content": "",
                            "user": {
                                "name": "",
                                "avatar": "",
                                "is_designer": 0
                            }
                        },
                        ...
                    ]
                } ,
                ...

            ]
        }
    }
}

Store

POST : /api/designnest/v1/projects/{projectID}/comments

projectID : the ID of the current project

Request :

{
    "project" : {
        "comment" : {
            "parent_comment_id" : 0 ,
            "content" : ''
        }
    }
}

title : The parent ID of the comment, ( by default parent_comment_id = 0 , if it's a first-level comment, it is nullable)

content : Content of comment

Response :

{
    "code" : 1 ,
    "message" : "" ,
    "data" : [
        "id" => 0 ,
    ]
}

Patch

PATCH : /api/designnest/v1/projects/{projectID}/comments/{commentID}

projectID : the ID of the current project

commentID : the ID of the current comment

Response :

{
    "code" : 1 ,
    "message" : "" ,
    "data" : []
}