User.php
77 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * @copyright © Melograno Ventures. All rights reserved. |
| 5 | * @licence See COPYING.md for license details. |
| 6 | */ |
| 7 | |
| 8 | namespace AmeliaBooking\Infrastructure\Routes\User; |
| 9 | |
| 10 | use AmeliaBooking\Application\Controller\User\Customer\GetCustomersController; |
| 11 | use AmeliaBooking\Application\Controller\User\Customer\GetCustomerController; |
| 12 | use AmeliaBooking\Application\Controller\User\Customer\AddCustomerController; |
| 13 | use AmeliaBooking\Application\Controller\User\Customer\UpdateCustomerController; |
| 14 | use AmeliaBooking\Application\Controller\User\Customer\UpdateCustomerNoteController; |
| 15 | use AmeliaBooking\Application\Controller\User\Customer\UpdateCustomerStatusController; |
| 16 | use AmeliaBooking\Application\Controller\User\DeleteUserController; |
| 17 | use AmeliaBooking\Application\Controller\User\GetCurrentUserController; |
| 18 | use AmeliaBooking\Application\Controller\User\GetUserDeleteEffectController; |
| 19 | use AmeliaBooking\Application\Controller\User\GetWPUsersController; |
| 20 | use AmeliaBooking\Application\Controller\User\Provider\UpdateProviderStatusController; |
| 21 | use AmeliaBooking\Application\Controller\User\Provider\GetProviderController; |
| 22 | use AmeliaBooking\Application\Controller\User\Provider\GetProvidersController; |
| 23 | use AmeliaBooking\Application\Controller\User\Provider\AddProviderController; |
| 24 | use AmeliaBooking\Application\Controller\User\Provider\UpdateProviderController; |
| 25 | use Slim\App; |
| 26 | |
| 27 | /** |
| 28 | * Class User |
| 29 | * |
| 30 | * @package AmeliaBooking\Infrastructure\Routes\User |
| 31 | */ |
| 32 | class User |
| 33 | { |
| 34 | /** |
| 35 | * @param App $app |
| 36 | */ |
| 37 | public static function routes(App $app) |
| 38 | { |
| 39 | $app->get('/users/wp-users', GetWPUsersController::class); |
| 40 | |
| 41 | // Customers |
| 42 | $app->get('/users/customers/{id:[0-9]+}', GetCustomerController::class); |
| 43 | |
| 44 | $app->get('/users/customers', GetCustomersController::class); |
| 45 | |
| 46 | $app->post('/users/customers', AddCustomerController::class); |
| 47 | |
| 48 | $app->post('/users/customers/{id:[0-9]+}', UpdateCustomerController::class); |
| 49 | |
| 50 | $app->post('/users/customers/{id:[0-9]+}/note', UpdateCustomerNoteController::class); |
| 51 | |
| 52 | $app->post('/users/customers/delete/{id:[0-9]+}', DeleteUserController::class); |
| 53 | |
| 54 | $app->get('/users/customers/effect/{id:[0-9]+}', GetUserDeleteEffectController::class); |
| 55 | |
| 56 | $app->post('/users/customers/status/{id:[0-9]+}', UpdateCustomerStatusController::class); |
| 57 | |
| 58 | // Providers |
| 59 | $app->get('/users/providers/{id:[0-9]+}', GetProviderController::class); |
| 60 | |
| 61 | $app->get('/users/providers', GetProvidersController::class); |
| 62 | |
| 63 | $app->post('/users/providers', AddProviderController::class); |
| 64 | |
| 65 | $app->post('/users/providers/{id:[0-9]+}', UpdateProviderController::class); |
| 66 | |
| 67 | $app->post('/users/providers/status/{id:[0-9]+}', UpdateProviderStatusController::class); |
| 68 | |
| 69 | $app->post('/users/providers/delete/{id:[0-9]+}', DeleteUserController::class); |
| 70 | |
| 71 | $app->get('/users/providers/effect/{id:[0-9]+}', GetUserDeleteEffectController::class); |
| 72 | |
| 73 | // Current User |
| 74 | $app->get('/users/current', GetCurrentUserController::class); |
| 75 | } |
| 76 | } |
| 77 |