From a5002a3310b180d212d66a4cfb42b9b709afc2bc Mon Sep 17 00:00:00 2001 From: marsalva Date: Wed, 11 Feb 2026 08:17:10 +0000 Subject: [PATCH] Actualizar configuracion.html --- configuracion.html | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/configuracion.html b/configuracion.html index 42b2835..3157f5e 100644 --- a/configuracion.html +++ b/configuracion.html @@ -353,18 +353,3 @@ app.delete("/admin/users/:id", authMiddleware, async (req, res) => { try { await const port = process.env.PORT || 3000; autoUpdateDB().then(() => { app.listen(port, "0.0.0.0", () => console.log(`🚀 Server OK en puerto ${port}`)); }); -async function deleteStatus(id) { - if(!confirm("¿Borrar estado?")) return; - try { - const res = await fetch(`${API_URL}/statuses/${id}`, { method: 'DELETE', headers: { "Authorization": `Bearer ${localStorage.getItem("token")}` } }); - const json = await res.json(); - - if(res.ok) { - showToast("Estado eliminado"); - loadStatusesConfig(); - } else { - // Muestra el mensaje de error específico que envía el servidor - showToast(json.error || "No se pudo borrar", true); - } - } catch(e) { showToast("Error de conexión", true); } - } \ No newline at end of file