修改状态
开发中
PUT
http://localhost:8098/admin/post/status
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Body 参数application/json
postId
integer
文章 ID
status
enum<string> | enum<null>
文章状态(为 null 不变)
枚举值:
PUBLISHEDDRAFT
visible
enum<string> | enum<null>
文章可见性(为 null 不变)
枚举值:
VISIBLEHIDDEN
pinned
boolean | null
是否置顶(为 null 不变)
示例
{
"postId": 0,
"status": "PUBLISHED",
"visible": "VISIBLE",
"pinned": true
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request PUT 'http://localhost:8098/admin/post/status' \
--header 'Content-Type: application/json' \
--data-raw ''
返回响应
🟢200成功
application/json
Body
code
integer
必需
errMsg
null
必需
data
boolean
必需
示例
{
"code": 200,
"errMsg": null,
"data": true
}
修改于 2024-03-08 10:27:56