Appearance
POST
/chatx/moments/comment/delete
application/json
operationID
token
userID
commentID + 当前用户 userID + 未删除状态
0
commentID
delete_time
header must have operationID
token is empty
commentID and userID are required
fetch("http://localhost:10010/chatx/moments/comment/delete", { method: "POST", headers: { operationID: "moments-comment-delete-001", token: "user-token", "Content-Type": "application/json", }, body: JSON.stringify({ commentID: "ad01e8d7-4d0b-44c1-b4c2-1c4e53280511", }), }) .then((res) => res.json()) .then((data) => console.log(data));
{ "commentID": "ad01e8d7-4d0b-44c1-b4c2-1c4e53280511" }
{ "errCode": 0, "errMsg": "", "errDlt": "", "data": {} }
{ "errCode": 1001, "errMsg": "ArgsError", "errDlt": "commentID and userID are required" }
commentID + userID + delete_time=nil
删除评论
1. 接口定位
2. 请求定义
POST/chatx/moments/comment/deleteapplication/jsonoperationID传入token传入有效登录令牌3. 请求参数
Header 参数
Body 参数
字段说明
userID注入请求体,客户端无需传入。commentID + 当前用户 userID + 未删除状态匹配目标评论。4. 响应结构
通用响应包裹
0表示成功data 字段
5. 业务规则
token。commentID和userID同时存在。delete_time完成评论软删除。6. 错误码与失败场景
operationIDheader must have operationIDtokentoken is emptycommentID为空commentID and userID are required7. 示例
fetch 请求示例
请求示例(JSON)
成功响应示例
失败响应示例
8. 时序流程
operationID和token。userID注入请求。commentID和userID。commentID + userID + delete_time=nil执行评论软删除。9. 变更记录