Merge pull request #337 from R0m1k3/1.1

Update webhook request to use POST method with JSON payload
This commit is contained in:
LogiFlow authored and GitHub committed 2025-09-03 15:05:43 +02:00
commit 46dba77f7c
3 files changed
+5 -8

No files matched your search

+1 -1
View File
@@ -37,4 +37,4 @@ args = "npm run dev"
waitForPort = 5000
[agent]
integrations = ["javascript_object_storage==1.0.0", "javascript_database==1.0.0", "javascript_log_in_with_replit==1.0.0"]
integrations = ["javascript_object_storage==1.0.0", "javascript_log_in_with_replit==1.0.0", "javascript_database==1.0.0"]
Binary file not shown.

After

Width:  |  Height:  |  Size: 232 KiB

+4 -7
View File
@@ -149,17 +149,14 @@ export async function registerRoutes(app: Express): Promise<Server> {
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), 60000); // 60 secondes
console.log('🌐 BAP: Envoi vers webhook n8n (GET)...');
console.log('🌐 BAP: Envoi vers webhook n8n (POST avec body JSON)...');
const response = await fetch(webhookUrl, {
method: 'GET',
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-PDF-Base64': pdfBase64,
'X-Recipient': recipient,
'X-FileName': fileName,
'X-FileSize': fileBuffer.length.toString()
'Content-Type': 'application/json'
},
body: JSON.stringify(webhookPayload),
signal: controller.signal
});