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.

669 B
Raw Blame
import { guestRun } from "@/server/account-tool-run";
import { body } from "@/server/shorts-schemas";
import { stopJob, StopSchema } from "@/server/swap-studio";
import { asViewer } from "@/server/swap-studio-account";

/** Stop a mask, anchor, transcript, 24 fps copy or assembly that is still being made (an account's: its own). */
export async function POST(request: Request, ctx: RouteContext<"/api/swap-studio/projects/[id]/stop">) {
  return asViewer(
    request,
    async () => {
      const { id } = await ctx.params;
      return Response.json(await stopJob(id, await body(request, StopSchema, "Pick a job to stop")));
    },
    { guest: guestRun },
  );
}