feat(ops): add plaza post management page

List published and hidden posts with category filters, pagination, and
inline hide/restore actions for the operations console.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-07-05 19:27:21 +08:00
parent f63bb894d9
commit 13485558b5
5 changed files with 353 additions and 0 deletions
+12
View File
@@ -24,12 +24,24 @@ export type ReviewPost = {
title: string;
summary: string;
cover_url: string;
status: string;
author: { display_name: string; slug: string };
category: { name: string; slug: string; icon: string };
published_at: string;
sla_warning: boolean;
};
export type PlazaCategory = {
id: string;
name: string;
slug: string;
icon: string;
};
export async function fetchPlazaCategories() {
return opsFetch<{ categories: PlazaCategory[] }>('/api/ops/v1/categories');
}
export async function fetchReviewQueue(query = 'status=pending_review') {
const suffix = query.startsWith('?') ? query : query ? `?${query}` : '';
return opsFetch<{ posts: ReviewPost[]; next_cursor: string | null; has_more: boolean }>(