Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

811 B
Raw Blame
import { connection } from "next/server";
import { genjutsuExamples } from "@/lib/examples/catalog";
import { isOwnerRequest, sessionCookieOf } from "@/server/auth";

const NO_STORE = { "Cache-Control": "no-store" };

/**
 * Every Genjutsu mode's examples, the ones still only the owner's included (their mode or a feature they need hasn't
 * passed its GPU test yet). The page itself sends only the examples open to everyone; the owner's Genjutsu asks here
 * for the rest. The owner only.
 */
export async function GET(request: Request) {
  await connection();
  if (!isOwnerRequest(request, sessionCookieOf(request))) return Response.json({ error: "Only the studio's owner sees these" }, { status: 403, headers: NO_STORE });
  return Response.json({ examples: genjutsuExamples() }, { headers: NO_STORE });
}