mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-22 06:28:19 +02:00
Improve invoice verification by adding caching and manual refresh functionality
Implement an invoice verification cache to avoid redundant checks, introduce a manual refresh button to trigger verification on demand, and modify the API to accept a forceRefresh parameter. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 7c468936-2a88-4686-ac0a-84921a45222d Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/7c468936-2a88-4686-ac0a-84921a45222d/Sh7jLhH
This commit is contained in:
1 parent
414c32f110
commit
7fb037bf53
4 files changed
+141
-40
No files matched your search
+3
-2
@@ -860,7 +860,7 @@ export async function registerRoutes(app: Express): Promise<Server> {
|
||||
}
|
||||
}
|
||||
|
||||
const { invoiceReference } = req.body;
|
||||
const { invoiceReference, forceRefresh } = req.body;
|
||||
|
||||
if (!delivery.supplier || !delivery.group) {
|
||||
console.log('❌ Livraison manque informations:', {
|
||||
@@ -886,7 +886,8 @@ export async function registerRoutes(app: Express): Promise<Server> {
|
||||
// Appeler le service de vérification
|
||||
const result = await invoiceVerificationService.verifyInvoice(
|
||||
invoiceReference,
|
||||
delivery.groupId
|
||||
delivery.groupId,
|
||||
forceRefresh || false
|
||||
);
|
||||
|
||||
console.log('✅ Résultat vérification:', result);
|
||||
|
||||
Reference in new issue
Block a user