Add n8n community node, /api/v1/render alias, and job webhooks for OSS automation.
Payment-free self-hosted builds keep full API access with optional webhookUrl callbacks and the published n8n-nodes-songs2vid package source under integrations/n8n.
This commit is contained in:
@@ -292,11 +292,24 @@ export async function createVideoJob(
|
||||
|
||||
await reserveQuota(user.id, items.length);
|
||||
|
||||
const webhookRaw = body.webhookUrl?.trim() || null;
|
||||
if (webhookRaw) {
|
||||
try {
|
||||
const u = new URL(webhookRaw);
|
||||
if (u.protocol !== "https:" && u.protocol !== "http:") {
|
||||
throw new Error("webhookUrl must be http(s)");
|
||||
}
|
||||
} catch {
|
||||
throw new Error("Invalid webhookUrl. Provide an absolute http(s) URL for n8n callbacks.");
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
const job = await prisma.job.create({
|
||||
data: {
|
||||
userId: user.id,
|
||||
imagePath,
|
||||
webhookUrl: webhookRaw,
|
||||
items: {
|
||||
create: items.map((item, index) => {
|
||||
const wm = applyBrandWatermarkPolicy(
|
||||
|
||||
Reference in New Issue
Block a user