1. 评论管理
云笺
  • 账号管理
    • 获取验证码
      POST
    • 账号注册
      POST
    • 账号登陆
      POST
    • 忘记密码
      POST
    • 修改密码
      POST
    • 更改头像
      POST
    • 编辑个人信息
      POST
    • 修改背景图片
      POST
  • 内容管理
    • 发布内容
      POST
    • 分页查询内容
      POST
    • 搜索内容
      POST
    • 删除内容
      POST
    • 编辑内容
      POST
    • 上传图片
      POST
  • 评论管理
    • 发布评论
      POST
    • 查询评论
      POST
    • 删除评论
      POST
  • 反馈管理
    • 新建点赞
      POST
    • 取消点赞
      POST
    • 新建举报
      POST
  • 管理员管理
    • 封禁或解禁账号
      POST
    • 查看举报内容
      GET
    • 搜索用户
      GET
    • 查看用户留言
      GET
    • 删除举报
      POST
    • 获取举报数量
      GET
  1. 评论管理

发布评论

开发中
POST
/insertcomment
最后修改时间:2024-11-17 09:22:44

请求参数

Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
Body 参数application/json

示例
{
  "wallId": 1,        // 墙留言的ID
  "userId": 123,      // 评论者的ID
  "imgurl": "path/to/avatar.jpg",  // 头像路径(可选)
  "comment": "This is a comment.",  // 评论内容
  "name": "username", // 用户名
  "moment": "2024-10-09T14:12:00Z" // 评论时间
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location 'http://localhost:3000/walls/insertcomment' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
  "wallId": 1,        // 墙留言的ID
  "userId": 123,      // 评论者的ID
  "imgurl": "path/to/avatar.jpg",  // 头像路径(可选)
  "comment": "This is a comment.",  // 评论内容
  "name": "username", // 用户名
  "moment": "2024-10-09T14:12:00Z" // 评论时间
}'

返回响应

🟢200成功
application/json
Bodyapplication/json

示例
{
  "code": 200,
  "message": "Comment created successfully",
  "data": {
    "id": 123,
    "wallId": 1,
    "userId": 123,
    "imgurl": "path/to/avatar.jpg",
    "comment": "This is a comment.",
    "name": "username",
    "moment": "2024-10-09T14:12:00Z"
  }
}
修改于 2024-11-17 09:22:44
上一页
上传图片
下一页
查询评论
Built with