mirror of
https://github.com/R0m1k3/Regisflow.git
synced 2026-10-18 12:49:41 +02:00
Improve data handling and fix import issues, enhancing system stability
Fixes PostgreSQL SSL config, corrects backup import timestamp conversion, and adds log file. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 4b008663-bd72-492b-b0b6-fa252367e730 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/0715008c-7244-40f4-befc-26c014852236/4b008663-bd72-492b-b0b6-fa252367e730/0Ex3Oj1
This commit is contained in:
1 parent
205e4f03c8
commit
58d8c7a449
3 files changed
+70
No files matched your search
@@ -615,6 +615,21 @@ export async function registerRoutes(app: Express): Promise<Server> {
|
||||
saleWithoutId.userId = userIdMapping.get(saleData.userId);
|
||||
}
|
||||
|
||||
// Convert timestamp string to Date object
|
||||
if (saleWithoutId.timestamp && typeof saleWithoutId.timestamp === 'string') {
|
||||
saleWithoutId.timestamp = new Date(saleWithoutId.timestamp);
|
||||
}
|
||||
|
||||
// Convert date strings to Date objects - fix for backup import
|
||||
if (saleWithoutId.dateNaissance && typeof saleWithoutId.dateNaissance === 'string') {
|
||||
// Handle date format YYYY-MM-DD
|
||||
saleWithoutId.dateNaissance = saleWithoutId.dateNaissance;
|
||||
}
|
||||
if (saleWithoutId.dateDelivrance && typeof saleWithoutId.dateDelivrance === 'string') {
|
||||
// Handle date format YYYY-MM-DD
|
||||
saleWithoutId.dateDelivrance = saleWithoutId.dateDelivrance;
|
||||
}
|
||||
|
||||
await storage.createSale(saleWithoutId);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user