Add SportPath auth APIs and training content foundation

This commit is contained in:
Hamza-Ayed
2026-10-04 00:49:48 +03:00
parent e7f3c777d1
commit 5b90da6b18
23 changed files with 1451 additions and 238 deletions
+4 -3
View File
@@ -25,8 +25,7 @@ class Database {
$this->connection->query("SET time_zone = '+00:00'");
} catch (Throwable $e) {
error_log('Database initialization failed: ' . $e->getMessage());
http_response_code(500);
die(json_encode(['error' => 'Database connection failed']));
throw new RuntimeException('Database connection failed', 0, $e);
}
}
@@ -109,6 +108,8 @@ class Database {
// Prevent cloning
final class SingletonDatabase extends Database {
private function __clone() {}
private function __wakeup() {}
public function __wakeup() {
throw new LogicException('Database singleton cannot be unserialized');
}
}
?>