This update introduces explicit permission definitions for various route handlers across multiple routes. These changes enhance clarity and allow for more granular control over route access based on defined permissions. The updates ensure better manageability and scalability of endpoint permissions.
27 lines
647 B
PHP
27 lines
647 B
PHP
<?php
|
|
|
|
namespace routes;
|
|
|
|
use traits\route_t;
|
|
|
|
class washCertificateRoute
|
|
{
|
|
use route_t;
|
|
|
|
public function run(): void
|
|
{
|
|
/** All bookings */
|
|
$this->get('/modules/washcertificates', function () {
|
|
// Set the working directory to /modules/washcertificates,
|
|
// so the output directory is created in the correct location
|
|
chdir(WD . '/modules/washcertificates');
|
|
// Run the index.php file
|
|
require_once 'index.php';
|
|
exit();
|
|
},
|
|
[
|
|
'modules_washcertificates' => 'Get all wash certificates'
|
|
]
|
|
);
|
|
}
|
|
} |