文档
测试

3、更新文章

POST
http://localhost:88/api/post/post/updatepost

请求头

参数名
类型
描述
必填
Authorization
string
jwt身份认证信息
必填

请求参数

参数名
类型
描述
必填
id
string
文章id
必填
title
string
标题
必填
content
string
内容
必填
userId
string
作者id
必填
comments
int
评论数
必填
collects
int
收藏数
必填
view
int
浏览量
必填
sectionId
int
专栏id
必填
top
int
是否置顶
必填
essence
int
是否加精
必填
createTime
string
发布时间
必填
modifyTime
string
修改时间
必填

请求参数示例

```json { "id": "1494250302559117314", "title": "预防乳腺癌,你可以做些什么", "content": "这是一篇预防乳腺癌的文章····\n\n", "userId": "1491351452034928641", "comments": 0, "collects": 0, "view": 2, "sectionId": 0, "top": 0, // 0-否,1-是 "essence": 0, // 0-否,1-是 "createTime": "2022-02-17 10:00:09", "modifyTime": "2022-02-17 14:00:09" }

响应参数

参数名
类型
描述
必填
msg
string
提示信息
必填
code
int
0-成功,其他业务码-失败
必填
data
object
返回的数据信息
必填
id
string
文章id
必填
title
string
标题
必填
content
string
内容
必填
userId
string
作者id
必填
comments
int
评论数
必填
collects
int
收藏数
必填
view
int
浏览量
必填
sectionId
int
专栏id
必填
top
int
是否置顶
必填
essence
int
是否加精
必填
createTime
string
发布时间
必填
modifyTime
string
修改时间
必填

响应数据示例

```json { "msg": "success", "code": 0, "data": { "id": "1494250302559117314", "title": "预防乳腺癌,你可以做些什么", "content": "这是一篇预防乳腺癌的文章····\n\n", "userId": "1491351452034928641", "comments": 0, "collects": 0, "view": 2, "sectionId": 0, "top": 0, // 0-否,1-是 "essence": 0, // 0-否,1-是 "createTime": "2022-02-17 10:00:09", "modifyTime": "2022-02-17 10:02:24" } }