auto-save 2026-05-13 11:23 (~4)

This commit is contained in:
2026-05-13 11:23:24 +08:00
parent f4ce533b8d
commit 647b05a5bb
4 changed files with 35 additions and 12 deletions

View File

@@ -212,12 +212,12 @@ export function cutoutUrl(jobId: string, frameIndex: number, elementId: string):
export async function cleanupFrame(
jobId: string,
frameIdx: number,
region?: { x: number; y: number; w: number; h: number } | null,
regions?: Array<{ x: number; y: number; w: number; h: number }> | null,
): Promise<Job> {
const res = await fetch(`${API_BASE}/jobs/${jobId}/frames/${frameIdx}/cleanup`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ region: region ?? null }),
body: JSON.stringify({ regions: regions ?? null }),
})
if (!res.ok) {
const txt = await res.text().catch(() => "")