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