full upgrade to dev
This commit is contained in:
@@ -68,21 +68,24 @@ export async function POST(req: NextRequest) {
|
||||
}
|
||||
|
||||
// Call n8n webhook to trigger AI image generation
|
||||
const n8nResponse = await fetch(`${n8nWebhookUrl}/ai-image-generation`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...(n8nSecretToken && {
|
||||
Authorization: `Bearer ${n8nSecretToken}`,
|
||||
const n8nResponse = await fetch(
|
||||
`${n8nWebhookUrl}/webhook/ai-image-generation`,
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...(n8nSecretToken && {
|
||||
Authorization: `Bearer ${n8nSecretToken}`,
|
||||
}),
|
||||
},
|
||||
body: JSON.stringify({
|
||||
projectId: projectId,
|
||||
regenerate: regenerate,
|
||||
triggeredBy: "api",
|
||||
timestamp: new Date().toISOString(),
|
||||
}),
|
||||
},
|
||||
body: JSON.stringify({
|
||||
projectId: projectId,
|
||||
regenerate: regenerate,
|
||||
triggeredBy: "api",
|
||||
timestamp: new Date().toISOString(),
|
||||
}),
|
||||
});
|
||||
);
|
||||
|
||||
if (!n8nResponse.ok) {
|
||||
const errorText = await n8nResponse.text();
|
||||
|
||||
Reference in New Issue
Block a user