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:
@@ -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 }>(
|
||||
|
||||
Reference in New Issue
Block a user