{error}
- ) : kind === "posts" && posts.length === 0 ? ( -{error}
: null} + {kind === "posts" && posts.length === 0 ? ( +{error}
} - -- {excerpt(p.content) || "(无正文内容)"} -
-- {c.content} -
- - 所属帖子:《{c.post_title}》 - -- 内容审核 + 待审内容
{idle ? ( { - const res = await fetch( - `${API_BASE}/api/admin/moderation/pending-posts?page=${page}`, - ssrInit(cookieHeaders(cookieHeader)) - ); - if (!res.ok) throw new Error("获取待审核帖子失败"); - return res.json(); +/** SSR 待审数量(帖子 + 评论);失败时返回零,不阻塞仪表盘 */ +export interface PendingCounts { + posts: number; + comments: number; } -/** SSR 待审数量(帖子 + 评论);失败时返回零,不阻塞仪表盘 */ export async function fetchAdminPendingCounts( cookieHeader?: string ): Promise