From 5f69069aa0f839e2413191886daa5998e28baa7d Mon Sep 17 00:00:00 2001 From: Juan Pablo Vial Date: Mon, 3 Mar 2025 16:53:36 -0300 Subject: [PATCH] Rutas Reservations --- app/resources/routes/api/ventas/reservations.php | 12 ++++++++++++ .../API/Ventas/{Reservation.php => Reservations.php} | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 app/resources/routes/api/ventas/reservations.php rename app/src/Controller/API/Ventas/{Reservation.php => Reservations.php} (99%) diff --git a/app/resources/routes/api/ventas/reservations.php b/app/resources/routes/api/ventas/reservations.php new file mode 100644 index 0000000..7e2e194 --- /dev/null +++ b/app/resources/routes/api/ventas/reservations.php @@ -0,0 +1,12 @@ +group('/reservations', function($app) { + $app->post('/add[/]', [Reservations::class, 'add']); + $app->get('[/]', Reservations::class); +}); +$app->group('/reservation/{reservation_id}', function($app) { + $app->post('/edit[/]', [Reservations::class, 'edit']); + $app->delete('[/]', [Reservations::class, 'delete']); + $app->get('[/]', [Reservations::class, 'get']); +}); diff --git a/app/src/Controller/API/Ventas/Reservation.php b/app/src/Controller/API/Ventas/Reservations.php similarity index 99% rename from app/src/Controller/API/Ventas/Reservation.php rename to app/src/Controller/API/Ventas/Reservations.php index 42cec23..01c65db 100644 --- a/app/src/Controller/API/Ventas/Reservation.php +++ b/app/src/Controller/API/Ventas/Reservations.php @@ -7,7 +7,7 @@ use Incoviba\Controller\API\withJson; use Incoviba\Exception\ServiceAction; use Incoviba\Service; -class Reservation +class Reservations { use withJson;