W n8n
This commit is contained in:
parent
543a964235
commit
3126b520bc
File diff suppressed because one or more lines are too long
@ -8,24 +8,29 @@ import { Prisma } from '@prisma/client';
|
|||||||
// Types
|
// Types
|
||||||
interface MissionCreateInput {
|
interface MissionCreateInput {
|
||||||
name: string;
|
name: string;
|
||||||
oddScope?: string[];
|
oddScope: string[];
|
||||||
niveau: string;
|
niveau?: string;
|
||||||
intention: string;
|
intention?: string;
|
||||||
missionType: string;
|
missionType?: string;
|
||||||
donneurDOrdre: string;
|
donneurDOrdre?: string;
|
||||||
projection: string;
|
projection?: string;
|
||||||
services?: string[];
|
services?: string[];
|
||||||
participation?: string;
|
participation?: string;
|
||||||
profils?: string[];
|
profils?: string[];
|
||||||
guardians?: Record<string, string>;
|
guardians?: Record<string, string>;
|
||||||
volunteers?: string[];
|
volunteers?: string[];
|
||||||
logo?: string | null;
|
logo?: {
|
||||||
|
data: string;
|
||||||
|
name?: string;
|
||||||
|
type?: string;
|
||||||
|
} | null;
|
||||||
leantimeProjectId?: string | null;
|
leantimeProjectId?: string | null;
|
||||||
outlineCollectionId?: string | null;
|
outlineCollectionId?: string | null;
|
||||||
rocketChatChannelId?: string | null;
|
rocketChatChannelId?: string | null;
|
||||||
giteaRepositoryUrl?: string | null;
|
gitRepositoryId?: string | null;
|
||||||
penpotProjectId?: string | null;
|
status?: string;
|
||||||
creatorId?: string;
|
createdAt?: Date;
|
||||||
|
updatedAt?: Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface MissionUserInput {
|
interface MissionUserInput {
|
||||||
@ -242,6 +247,11 @@ export async function POST(request: Request) {
|
|||||||
guardians: body.guardians || {},
|
guardians: body.guardians || {},
|
||||||
volunteers: Array.isArray(body.volunteers) ? body.volunteers : [],
|
volunteers: Array.isArray(body.volunteers) ? body.volunteers : [],
|
||||||
creatorId: userId,
|
creatorId: userId,
|
||||||
|
logo: body.logo ? {
|
||||||
|
data: body.logo.data,
|
||||||
|
name: body.logo.name || 'logo.png',
|
||||||
|
type: body.logo.type || 'image/png'
|
||||||
|
} : null,
|
||||||
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