MCPcopy
hub / github.com/CapSoftware/Cap / requireAdmin

Function requireAdmin

apps/web/actions/admin/reprocess-video.ts:13–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11import { adminReprocessVideoWorkflow } from "@/workflows/admin-reprocess-video";
12
13async function requireAdmin() {
14 const user = await getCurrentUser();
15 if (!user || user.email !== MESSENGER_ADMIN_EMAIL) {
16 throw new Error("Unauthorized");
17 }
18 return user;
19}
20
21function parseVideoId(input: string) {
22 const trimmed = input.trim();

Callers 1

adminReprocessVideoFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected