still broken
Some checks failed
Deploy to Server / deploy (push) Failing after 5s

This commit is contained in:
2025-10-26 09:41:21 -04:00
parent 77d946eab4
commit a97e79a7d8

View File

@@ -174,6 +174,20 @@ router.delete('/items', async (_req, res) => {
}
});
// Debug: inspect parsed eBay prices for a given sku
router.get('/debug/ebay-prices', async (req, res) => {
try {
const skuParam = typeof req.query.sku === 'string' ? req.query.sku : '';
const norm = normalizeSku(skuParam);
if (!norm) return res.status(400).json({ error: 'sku required' });
const details = await debugFetchSoldPricesUSDForSku(norm);
res.json({ sku: norm, ...details });
} catch (err: any) {
console.error(err);
res.status(500).json({ error: err.message || 'Failed to debug ebay prices' });
}
});
// Update cached prices for all distinct SKUs (on-demand only)
router.post('/prices/update', async (_req, res) => {
try {
@@ -222,19 +236,6 @@ router.get('/price-report', async (_req, res) => {
};
});
// Debug: inspect parsed eBay prices for a given sku
router.get('/debug/ebay-prices', async (req, res) => {
try {
const skuParam = typeof req.query.sku === 'string' ? req.query.sku : '';
const norm = normalizeSku(skuParam);
if (!norm) return res.status(400).json({ error: 'sku required' });
const details = await debugFetchSoldPricesUSDForSku(norm);
res.json({ sku: norm, ...details });
} catch (err: any) {
console.error(err);
res.status(500).json({ error: err.message || 'Failed to debug ebay prices' });
}
});
// Build sku list with one description (first encountered)
const skuListMap: Record<string, { sku: string, price: number | null, currency: string, updatedAt: string | null, description: string } > = {};
for (const it of items) {