This commit is contained in:
alma 2025-05-23 17:10:08 +02:00
parent 543a964235
commit 3126b520bc
2 changed files with 27 additions and 15 deletions

File diff suppressed because one or more lines are too long

View File

@ -8,24 +8,29 @@ import { Prisma } from '@prisma/client';
// Types
interface MissionCreateInput {
name: string;
oddScope?: string[];
niveau: string;
intention: string;
missionType: string;
donneurDOrdre: string;
projection: string;
oddScope: string[];
niveau?: string;
intention?: string;
missionType?: string;
donneurDOrdre?: string;
projection?: string;
services?: string[];
participation?: string;
profils?: string[];
guardians?: Record<string, string>;
volunteers?: string[];
logo?: string | null;
logo?: {
data: string;
name?: string;
type?: string;
} | null;
leantimeProjectId?: string | null;
outlineCollectionId?: string | null;
rocketChatChannelId?: string | null;
giteaRepositoryUrl?: string | null;
penpotProjectId?: string | null;
creatorId?: string;
gitRepositoryId?: string | null;
status?: string;
createdAt?: Date;
updatedAt?: Date;
}
interface MissionUserInput {
@ -242,6 +247,11 @@ export async function POST(request: Request) {
guardians: body.guardians || {},
volunteers: Array.isArray(body.volunteers) ? body.volunteers : [],
creatorId: userId,
logo: body.logo ? {
data: body.logo.data,
name: body.logo.name || 'logo.png',
type: body.logo.type || 'image/png'
} : null,
config: {
N8N_API_KEY: process.env.N8N_API_KEY,
MISSION_API_URL: process.env.NEXT_PUBLIC_API_URL || 'https://api.slm-lab.net/api'