<?php

    include("../../classes/database.class.php");
    include("../../classes/sensorModel.class.php");
    include("../../classes/sensorController.class.php");
    
    $idSensor = $_POST["idSensor"];
    $sensor1 = $_POST["sensor1"];
    $sensor2 = $_POST["sensor2"];
    $onoff = $_POST["onoff"];
    $prensa = $_POST["prensa"];

    $modelo = new SensorController($sensor1, $sensor2);
    $rows = $modelo->updateShutDown($idSensor, $onoff, $prensa);

   echo json_encode($rows);