Files
LogiFlow/attached_assets/Pasted--endDate-2025-09-30-storeId-1-userRole-manager-Non-admin--1756903879290_1756903879290.txt
T
michaelschal 7a37fcacbd Update webhook to use GET request and add file details
Correct the HTTP method for the webhook request to GET and include additional file-related headers in server/routes.ts. Also, reorders integrations in .replit for clarity.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: cfbfe47c-0c9a-4ebf-8a41-2937407eccff
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/cfbfe47c-0c9a-4ebf-8a41-2937407eccff/7RlGXpp
2025-09-03 12:52:42 +00:00

204 lines
3.2 KiB
Plaintext

endDate: '2025-09-30',
storeId: '1',
userRole: 'manager'
}
🔍 Non-admin orders - filtering by accessible store: { userId: '_1754943032954', role: 'manager', requestedStoreId: 1 }
Deliveries API called with: {
startDate: '2025-09-01',
endDate: '2025-09-30',
storeId: '1',
withBL: undefined,
userRole: 'manager'
}
🔍 Non-admin deliveries - filtering by accessible store: { userId: '_1754943032954', role: 'manager', requestedStoreId: 1 }
📋 API PUBLICITIES REQUEST: {
year: '2025',
filterYear: 2025,
storeId: undefined,
userRole: 'manager'
}
📋 CALLING storage.getPublicities: { filterYear: 2025, groupIds: [ 1 ] }
📋 PUBLICITES FETCHED: 29 résultats pour année 2025
🔍 PREMIERS RESULTATS: [
'1. N°2501 - Blanc',
'2. N°2502 - Moins de 1€ 2€ 3€ 4€ 5€',
'3. N°2503 - Imbattables'
]
📋 PUBLICITIES RETURNED: { count: 29 }
GET /api/publicities 304 in 22ms
📊 Statistiques calculées: {
ordersCount: 12,
deliveriesCount: 10,
pendingOrdersCount: 10,
averageDeliveryTime: 3.6666666666666665,
totalPalettes: 29,
totalPackages: 3
}
GET /api/stats/monthly 200 in 31ms
Orders returned: 12 items
GET /api/orders 200 in 33ms
Deliveries returned: 10 items
GET /api/deliveries 304 in 34ms
GET /api/user 304 in 5ms
GET /api/user 304 in 3ms
HEAD /api/health 200 in 1ms
Orders API called with: {
startDate: undefined,
endDate: undefined,
storeId: undefined,
userRole: 'manager'
}
🔍 Manager orders - using assigned store automatically: {
userId: '_1754943032954',
role: 'manager',
assignedStore: 1,
allUserGroups: [ 1 ]
}
GET /api/suppliers 200 in 8ms
GET /api/user 304 in 9ms
🔗 PRODUCTION: getOrders() récupéré 56 commandes avec relations
Orders returned: 56 items
GET /api/orders 304 in 84ms
HEAD /api/health 200 in 1ms
HEAD /api/health 200 in 0ms
HEAD /api/health 200 in 0ms
HEAD /api/health 200 in 1ms
🔍 BAP: Requête reçue {
hasUser: true,
userType: 'object',
hasClaims: false,
hasId: true,
bodyKeys: [ 'pdfBase64', 'fileName', 'recipient' ]
}
🔍 BAP: User ID extracted: admin_local
🔍 BAP: User found: { id: 'admin_local', role: 'admin' }
📤 BAP: Envoi webhook n8n {
recipient: 'Prissela',
fileName: '20250903_113707.pdf',
fileSize: 344773,
userId: 'admin_local'
}
✅ BAP: Payload JSON préparé {
recipient: 'Prissela',
fileName: '20250903_113707.pdf',
fileSize: 344773
}
🌐 BAP: Envoi vers webhook n8n...
🌐 BAP: Réponse webhook reçue { status: 404, ok: false }
❌ BAP: Erreur webhook {
status: 404,
errorText: '{"code":404,"message":"This webhook is not registered for POST requests. Did you mean to make a GET request?"}'
}
❌ BAP: Erreur complète: {
name: 'Error',
message: 'Erreur webhook: 404 Not Found',
stack: 'Error: Erreur webhook: 404 Not Found\n' +
' at file:///app/dist/index.js:12408:15\n' +
' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)'
}
POST /api/bap/send-webhook 500 in 41ms
HEAD /api/health 200 in 1ms