mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-11 17:27:31 +02:00
Merge pull request #337 from R0m1k3/1.1
Update webhook request to use POST method with JSON payload
This commit is contained in:
3 files changed
+5
-8
No files matched your search
@@ -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
@@ -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
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user