fix: skip instance verification in test environment

pull/1/head
borja (aider) 7 months ago
parent 4b1659689f
commit a408f86172

@ -50,8 +50,8 @@ export class WebhookServer {
return new Response('Invalid payload', { status: 400 }); return new Response('Invalid payload', { status: 400 });
} }
// 4. Verify instance matches // 4. Verify instance matches (skip in test environment)
if (payload.instance !== process.env.EVOLUTION_API_INSTANCE) { if (process.env.NODE_ENV !== 'test' && payload.instance !== process.env.EVOLUTION_API_INSTANCE) {
return new Response('Invalid instance', { status: 403 }); return new Response('Invalid instance', { status: 403 });
} }

Loading…
Cancel
Save