Refactor vehicle management and add vehicle add-on functionality.

This update refactors vehicle-related routes to include consistent endpoints, enhanced functionality, and stricter permission checks. It introduces vehicle add-on management with toggling and retrieval APIs, enabling detailed customization and user control. Additionally, the new `asArray` methods and updated logic improve data handling and validation.
This commit is contained in:
Jepp9350
2025-04-09 09:02:17 +02:00
parent e4ec92d66c
commit 1a71da0526
6 changed files with 559 additions and 118 deletions
+15
View File
@@ -96,6 +96,21 @@ trait route_t
return 'Y-m-d';
}
/**
* TYPE_BOOL
* @note This is used to check if the value is a boolean, this is used in routes to validate input
* @return string
*/
public function TYPE_BOOL(): string
{
return 'boolean';
}
/**
* @param string $date
* @param string $format
* @return void
*/
public function requireDateFormat(string $date, string $format): void
{
global $response;