debug: Tabellen-Status Endpoint
This commit is contained in:
@@ -59,4 +59,14 @@ router.delete('/:id', authenticate, (req, res) => {
|
|||||||
res.json({ ok: true });
|
res.json({ ok: true });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Debug: Tabellenstatus prüfen
|
||||||
|
router.get('/debug-table', (req, res) => {
|
||||||
|
try {
|
||||||
|
const exists = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='public_file_shares'").get();
|
||||||
|
const count = exists ? db.prepare('SELECT COUNT(*) as n FROM public_file_shares').get() : null;
|
||||||
|
const cols = exists ? db.pragma('table_info(public_file_shares)').map(c=>c.name) : [];
|
||||||
|
res.json({ exists: !!exists, count: count?.n, cols });
|
||||||
|
} catch(e) { res.status(500).json({ error: e.message }); }
|
||||||
|
});
|
||||||
|
|
||||||
module.exports = router;
|
module.exports = router;
|
||||||
|
|||||||
Reference in New Issue
Block a user