From 5e5c3f69a41fb854953bd772c4120dd44fe5b949 Mon Sep 17 00:00:00 2001 From: alma Date: Thu, 8 Jan 2026 09:54:08 +0100 Subject: [PATCH] connection n8n --- app/api/missions/test-n8n-config/route.ts | 34 +++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/app/api/missions/test-n8n-config/route.ts b/app/api/missions/test-n8n-config/route.ts index 5896e2d9..2aab3f69 100644 --- a/app/api/missions/test-n8n-config/route.ts +++ b/app/api/missions/test-n8n-config/route.ts @@ -30,7 +30,37 @@ export async function GET(request: Request) { const n8nDeleteWebhookUrl = process.env.N8N_DELETE_WEBHOOK_URL; // Construire la réponse - const config = { + const config: { + environment: { + hasN8NApiKey: boolean; + n8nApiKeyLength: number; + n8nApiKeyPrefix: string; + n8nWebhookUrl: string; + n8nRollbackWebhookUrl: string; + n8nDeleteWebhookUrl: string; + missionApiUrl: string; + }; + urls: { + webhookUrl: string; + callbackUrl: string; + rollbackUrl: string; + deleteUrl: string; + webhookTest?: { + status?: number; + statusText?: string; + reachable?: boolean; + note?: string; + error?: string; + }; + }; + status: { + configured: boolean; + missingApiKey: boolean; + missingApiUrl: boolean; + ready: boolean; + }; + recommendations: string[]; + } = { // Variables d'environnement environment: { hasN8NApiKey: !!n8nApiKey, @@ -59,7 +89,7 @@ export async function GET(request: Request) { }, // Recommandations - recommendations: [] as string[], + recommendations: [], }; // Ajouter des recommandations basées sur la configuration