* Admin-gated, intentionally uncached: the session read and moderation-queue * queries run per request and stream inside the page's Suspense boundary.
()
| 20 | * queries run per request and stream inside the page's Suspense boundary. |
| 21 | */ |
| 22 | async function AdminPluginsContent() { |
| 23 | const session = await getSession(); |
| 24 | |
| 25 | if (!session || !isAdmin(session.user.id)) { |
| 26 | redirect("/"); |
| 27 | } |
| 28 | |
| 29 | const [ |
| 30 | { data: flagged }, |
| 31 | { data: stuck }, |
| 32 | { data: pending }, |
| 33 | { data: verification }, |
| 34 | ] = await Promise.all([ |
| 35 | getFlaggedPlugins(), |
| 36 | getStuckScans(), |
| 37 | getPendingPlugins(), |
| 38 | getPendingVerificationRequests(), |
| 39 | ]); |
| 40 | |
| 41 | return ( |
| 42 | <AdminPluginsTabs |
| 43 | flagged={flagged ?? []} |
| 44 | stuck={stuck ?? []} |
| 45 | pending={pending ?? []} |
| 46 | verification={verification ?? []} |
| 47 | /> |
| 48 | ); |
| 49 | } |
| 50 | |
| 51 | export default function AdminPluginsPage() { |
| 52 | return ( |
nothing calls this directly
no test coverage detected