Improve product expiry date filtering and supplier data retrieval

Refactor storage logic to correctly filter products by expiry date (expires_soon, expired, active) and update supplier DLC enablement check in routes.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: f2b9c241-9fdd-4abd-9041-720afc8b27d6
Replit-Commit-Checkpoint-Type: full_checkpoint
This commit is contained in:
michaelschal committed 2025-09-02 08:47:11 +00:00
1 parent e0bcfcdb13
commit 3b54c6fbdb
4 files changed
+9 -6

No files matched your search

+1 -1
View File
@@ -216,7 +216,7 @@ export async function registerRoutes(app: Express): Promise<Server> {
// Filter suppliers for DLC enabled only if requested
if (dlcFilter) {
const dlcSuppliers = suppliers.filter(supplier => supplier.dlcEnabled === true);
const dlcSuppliers = suppliers.filter(supplier => supplier.hasDlc === true);
res.json(dlcSuppliers);
} else {
res.json(suppliers);