wip: snapshot V2 cascade onglet 2 (sauvegarde avant chirurgie git-hygiene)
This commit is contained in:
@@ -72,21 +72,6 @@ const { data: org, pending, error } = await useFetch<Org>(`/api/fiche/${orgId}`,
|
||||
key: `fiche-${orgId}`,
|
||||
})
|
||||
|
||||
// ── Fallback Pratiques regeneratives (bug E2E L1) ─────────────────────
|
||||
// Si /api/fiche/:id echoue, on regarde si l'id correspond a une pratique
|
||||
// regenerative et on redirige automatiquement vers /pratique/:id.
|
||||
if (error.value) {
|
||||
try {
|
||||
const pratiquesRes = await $fetch<{ list: { id: number }[] }>('/api/pratiques')
|
||||
const numericId = Number(orgId)
|
||||
if (!isNaN(numericId) && pratiquesRes.list?.some((p) => p.id === numericId)) {
|
||||
await navigateTo(`/pratique/${numericId}`, { replace: true })
|
||||
}
|
||||
} catch {
|
||||
// pas de fallback dispo, on garde l'erreur
|
||||
}
|
||||
}
|
||||
|
||||
// ── Commentaires — tick de rafraîchissement ───────────────────────────
|
||||
const commentRefreshTick = ref(0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user