<?php
session_start();
header('Content-Type: application/json');

$response = [];

if (isset($_SESSION['id_ruta_eliminada'])) {
    $response['delate'] = $_SESSION['id_ruta_eliminada'];
} else {
    $response['error'] = "⚠️ No existe un dato en la sesión [id_ruta_eliminada]";
}

echo json_encode($response);
