Add dropper location selector: discover available droppers on network, pass through server, and add dropdown in order panel for location-based dispensing
This commit is contained in:
@@ -169,6 +169,23 @@ app.get('/api/texture/:namespace/*', async (req, res) => {
|
||||
}
|
||||
});
|
||||
|
||||
// Clear negative texture cache (.miss files) — call after updating texture mappings
|
||||
app.delete('/api/texture-cache/negative', (req, res) => {
|
||||
let cleared = 0;
|
||||
function walk(dir) {
|
||||
try {
|
||||
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
||||
const full = path.join(dir, entry.name);
|
||||
if (entry.isDirectory()) walk(full);
|
||||
else if (entry.name.endsWith('.miss')) { fs.unlinkSync(full); cleared++; }
|
||||
}
|
||||
} catch (_) { /* ignore */ }
|
||||
}
|
||||
walk(TEXTURE_CACHE_DIR);
|
||||
console.log(`[Texture Cache] Cleared ${cleared} negative cache entries`);
|
||||
res.json({ cleared });
|
||||
});
|
||||
|
||||
// Health check
|
||||
app.get('/api/health', (req, res) => {
|
||||
res.json({
|
||||
|
||||
Reference in New Issue
Block a user