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