Update API endpoints, add wash certificate handling
Replaced legacy 'nnks.truckwash.dk' endpoint with 'api.truckwash.dk' across the codebase for consistency. Implemented a feature to handle certificate downloads, including file serving and validation. Updated PHP configuration to support additional dependencies like PHPMailer, and introduced necessary route and configuration changes for wash certificate processing.
This commit is contained in:
@@ -105,12 +105,13 @@ class redis implements redis_i
|
||||
public function get_department_name(int $department_id): string|null
|
||||
{
|
||||
// Get the department name
|
||||
$tmp_department = (object)$this->get('department_' . $department_id) ?? null;
|
||||
$tmp_department = $this->get('department_' . $department_id) ?? null;
|
||||
if ($tmp_department === 'IS_EMPTY_OR_NULL' || $tmp_department === null) {
|
||||
return null;
|
||||
}
|
||||
$tmp_department = json_decode($tmp_department);
|
||||
// Return the department name
|
||||
return $tmp_department->name;
|
||||
return $tmp_department->name ?: $tmp_department['name'] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user