Files
LogiFlow/test-sync-production.js
T
michaelschal c648396f57 Provide guide for immediate synchronization of order and delivery statuses
Add a guide document with SQL scripts and testing instructions for synchronizing order and delivery statuses, including fixing missing delivery dates.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: a8a78c07-e900-425c-a577-5b4c5894379d
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/a8a78c07-e900-425c-a577-5b4c5894379d/KuIk8gU
2025-08-11 20:35:49 +00:00

46 lines
1.1 KiB
JavaScript

// Script pour tester la synchronisation directement en production
const https = require('https');
const data = JSON.stringify({});
const options = {
hostname: 'logiflow-logiflow-1.c-2.us-east-2.aws.neon.tech',
port: 443,
path: '/api/sync-order-delivery-status',
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Content-Length': Buffer.byteLength(data),
// Vous devez remplacer par votre cookie de session réel
'Cookie': 'connect.sid=VOTRE_SESSION_COOKIE_ICI'
}
};
console.log('🔄 Testing production sync API...');
const req = https.request(options, (res) => {
console.log(`Status: ${res.statusCode}`);
console.log(`Headers:`, res.headers);
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log('Response:', responseData);
try {
const parsed = JSON.parse(responseData);
console.log('✅ Sync result:', JSON.stringify(parsed, null, 2));
} catch (e) {
console.log('Raw response:', responseData);
}
});
});
req.on('error', (error) => {
console.error('❌ Error:', error);
});
req.write(data);
req.end();