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:
Jepp9350
2025-01-31 09:25:18 +01:00
parent 13fb3a10ae
commit ca52d3b248
8 changed files with 100 additions and 10 deletions
+3 -2
View File
@@ -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;
}
/**