1 | <?php |
2 | |
3 | require_once __DIR__ . "/../lib/php/ejecutaServicio.php"; |
4 | require_once __DIR__ . "/../lib/php/JsonResponse.php"; |
5 | require_once __DIR__ . "/../lib/php/pdFaltaId.php"; |
6 | require_once __DIR__ . "/../lib/php/leeEntero.php"; |
7 | require_once __DIR__ . "/bd/productoElimina.php"; |
8 | |
9 | ejecutaServicio(function () { |
10 | $id = leeEntero("id"); |
11 | if ($id === null) throw pdFaltaId(); |
12 | productoElimina($id); |
13 | return JsonResponse::noContent(); |
14 | }); |
15 |