Files
2026-02-10 01:14:19 +00:00

16 lines
456 B
TypeScript

import { NextResponse } from "next/server";
import { createPrintfulSyncProduct } from "../../../../lib/printful";
export async function POST(req: Request) {
try {
const body = await req.json();
const result = await createPrintfulSyncProduct(body);
return NextResponse.json({ result });
} catch (err: any) {
return NextResponse.json(
{ error: err?.message || "Failed to create sync product." },
{ status: 500 }
);
}
}