W n8n attention vm
This commit is contained in:
parent
1bb2c8b17a
commit
03eafa5588
@ -231,6 +231,12 @@ export async function POST(request: Request) {
|
||||
|
||||
// Only create mission in database after n8n succeeds
|
||||
try {
|
||||
console.log('Creating mission with data:', {
|
||||
name: body.name,
|
||||
logoPath: body.logoPath,
|
||||
logo: body.logo
|
||||
});
|
||||
|
||||
const missionData = {
|
||||
name: body.name,
|
||||
oddScope: body.oddScope,
|
||||
@ -243,13 +249,20 @@ export async function POST(request: Request) {
|
||||
profils: body.profils,
|
||||
participation: body.participation,
|
||||
creatorId: userId,
|
||||
logo: body.logo
|
||||
logo: body.logoPath ? `missions/${body.logoPath}` : null // Ensure proper path format
|
||||
};
|
||||
|
||||
console.log('Mission data to be saved:', missionData);
|
||||
|
||||
const mission = await prisma.mission.create({
|
||||
data: missionData
|
||||
});
|
||||
|
||||
console.log('Mission created with logo:', {
|
||||
missionId: mission.id,
|
||||
logo: mission.logo
|
||||
});
|
||||
|
||||
return NextResponse.json({
|
||||
success: true,
|
||||
mission,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user