Comment and Like Interface

API call address

{域名地址}/api/comment/praise

illustrate:{域名地址}You need to replace it with your domain address, such as/api/comment/praise

Calling methods

POST application/json

Request parameters

Field name type Required illustrate
id int yes Comment ID

Return parameters

Field name type illustrate
code int Error code
msg string Error Cause Description

Request data example

{
    "id":33
}

Return to the data example

{
    "code": 0,
    "data": {
        "id": 33,
        "created_time": 1662734920,
        "updated_time": 1662735286,
        "archive_id": 140,
        "user_id": 0,
        "user_name": "anqicms",
        "ip": "127.0.0.1",
        "vote_count": 2,
        "content": "欢迎使用anqicms",
        "parent_id": 0,
        "to_uid": 0,
        "status": 0,
        "item_title": "欢迎使用AnqiCMS",
        "parent": null,
        "active": true
    },
    "msg": "点赞成功"
}

Error code

Error code illustrate
0 OK
-1 Error, the cause of the error is pointed out in msg
1001 Not logged in
1002 Unauthorized
200 API request OK