Add reversible post archiving across Wiki discovery and feeds
waterfall-wiki CI and deployment / verify-and-deploy (push) Successful in 18m21s
waterfall-wiki CI and deployment / verify-and-deploy (push) Successful in 18m21s
This commit is contained in:
@@ -2,6 +2,13 @@ import type {NextApiRequest,NextApiResponse} from 'next';
|
||||
|
||||
// Read documentation before business validation or storage access. Mutations never enter this branch.
|
||||
export const apiDocuments:Record<string,readonly string[]>={
|
||||
"/api/posts/{id}/archive": [
|
||||
"归档或恢复笔记", "POST",
|
||||
"路径参数 id 为存储 UUID 或24位 publicId。JSON 参数:{archived:true} 归档,{archived:false} 恢复。重复调用幂等,不删除 post、正文、媒体、标签或页面记录。",
|
||||
"200 {post:{id,publicId,title,archived,archivedAt,url}}。归档内容不出现在首页、分类、搜索和普通素材流,仍可通过原地址读取并恢复。GET /api/feed?archived=true 列举归档内容;默认只列出未归档内容。",
|
||||
"POST /api/posts/{id}/archive\n{\"archived\":true}",
|
||||
"400 参数不合法;404 笔记不存在;405 方法不支持。"
|
||||
],
|
||||
"/api/explore-feed": [
|
||||
"统一内容流",
|
||||
"GET",
|
||||
@@ -13,7 +20,7 @@ export const apiDocuments:Record<string,readonly string[]>={
|
||||
"/api/feed": [
|
||||
"素材列表",
|
||||
"GET",
|
||||
"查询参数:section(images / videos / audio / articles / motion,可选);path(可选,标签 path);q(可选,最多 200 字符);cursor(可选,上一页 nextCursor)。",
|
||||
"查询参数:archived(字符串 true / false,默认 false;true 只列出归档);section(images / videos / audio / articles / motion,可选);path(可选,标签 path);q(可选,最多 200 字符);cursor(可选,上一页 nextCursor)。",
|
||||
"JSON:posts、tags、contributions、nextCursor;每页最多 24 个 post。",
|
||||
"GET /api/feed?section=images",
|
||||
"400:未知 section、标签或无效游标。"
|
||||
|
||||
Reference in New Issue
Block a user