Archives — panneau des fiches supprimées avec restauration
Bouton Archives dans la barre de filtres de la frise. Panneau latéral listant les fiches supprimées avec aperçu complet. Restauration recrée la fiche dans la frise. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -385,6 +385,19 @@ app.post('/api/versions/:id/restore', requireAuth, async (req, res) => {
|
||||
}
|
||||
});
|
||||
|
||||
// List archived (deleted) frise cards
|
||||
app.get('/api/archives', requireAuth, async (req, res) => {
|
||||
if (!NOCODB_VERSIONS_TABLE_ID) return res.json({ list: [] });
|
||||
try {
|
||||
const url = `${NOCODB_URL}/api/v1/db/data/noco/${NOCODB_BASE_ID}/${NOCODB_VERSIONS_TABLE_ID}?where=(Type,eq,frise)~and(Label,like,%25supprimé%25)&sort=-CreatedAt&limit=100`;
|
||||
const r = await fetch(url, { headers: { 'xc-token': NOCODB_TOKEN } });
|
||||
const data = await r.json();
|
||||
res.json(data);
|
||||
} catch (e) {
|
||||
res.status(500).json({ error: e.message });
|
||||
}
|
||||
});
|
||||
|
||||
// ── Personnages API ──
|
||||
|
||||
function personnagesProxy(tableIdVar) {
|
||||
|
||||
Reference in New Issue
Block a user