W n8n
This commit is contained in:
parent
7298d246c1
commit
7c08add31f
File diff suppressed because one or more lines are too long
937
My_workflow_43.json
Normal file
937
My_workflow_43.json
Normal file
File diff suppressed because one or more lines are too long
@ -140,7 +140,7 @@ export async function POST(request: Request) {
|
|||||||
}, { status: 400 });
|
}, { status: 400 });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Verify that the creator exists
|
// Verify that the creator exists BEFORE triggering n8n workflow
|
||||||
const creator = await prisma.user.findUnique({
|
const creator = await prisma.user.findUnique({
|
||||||
where: { id: userId }
|
where: { id: userId }
|
||||||
});
|
});
|
||||||
@ -217,7 +217,7 @@ export async function POST(request: Request) {
|
|||||||
profils: Array.isArray(body.profils) ? body.profils : [],
|
profils: Array.isArray(body.profils) ? body.profils : [],
|
||||||
guardians: body.guardians || {},
|
guardians: body.guardians || {},
|
||||||
volunteers: Array.isArray(body.volunteers) ? body.volunteers : [],
|
volunteers: Array.isArray(body.volunteers) ? body.volunteers : [],
|
||||||
creatorId: userId,
|
creatorId: userId, // Use the verified userId
|
||||||
config: {
|
config: {
|
||||||
N8N_API_KEY: process.env.N8N_API_KEY,
|
N8N_API_KEY: process.env.N8N_API_KEY,
|
||||||
MISSION_API_URL: process.env.NEXT_PUBLIC_API_URL || 'https://api.slm-lab.net/api'
|
MISSION_API_URL: process.env.NEXT_PUBLIC_API_URL || 'https://api.slm-lab.net/api'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user