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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user