<?php

header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Headers: *');

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

require '../../modelo/dia_inhabil.php';
require '../../modelo/environment.php';

$response = array();

$url_servidor = Environment::getUrlServidor();

$dias_inhabiles = DiaInhabil::mdlGetDiasInhabiles();

if (!$dias_inhabiles) {
    $response['response'] = 'error';
    $response['data'] = 'No se encontraron dias_inhabiles';
    return;
}

$response['response'] = 'success';
$response['data'] = $dias_inhabiles;
echo json_encode($response);