<?php

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

require '../../modelo/uso_cfdi.php';
$response = array();

$usos_cfdi = UsoCFDI::mdlGetAllUsosCFDI();

if (!$usos_cfdi) {
    $response['response'] = 'error';
    $response['data'] = 'No se encontraron registros';
    echo json_encode($response);
    return;
}

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