replaced PDI with DatabaseConnection
Signed-off-by: tracer <tracer@24unix.net>
This commit is contained in:
parent
079f46dd18
commit
4f02c68cc5
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
namespace App\Controller;
|
namespace App\Controller;
|
||||||
|
|
||||||
use PDO;
|
|
||||||
use UnhandledMatchError;
|
use UnhandledMatchError;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -16,14 +15,14 @@ class RequestController
|
||||||
private String $message;
|
private String $message;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \PDO $dbConnection
|
* @param \App\Controller\DatabaseConnection $databaseConnection
|
||||||
* @param String $requestMethod
|
* @param String $requestMethod
|
||||||
* @param array $uri
|
* @param array $uri
|
||||||
*/
|
*/
|
||||||
public function __construct(private PDO $dbConnection, private String $requestMethod, private array $uri)
|
public function __construct(private DatabaseConnection $databaseConnection, private String $requestMethod, private array $uri)
|
||||||
{
|
{
|
||||||
$this->requestMethod = strtoupper($requestMethod);
|
$this->requestMethod = strtoupper($requestMethod);
|
||||||
$this->domainController = new DomainController($dbConnection);
|
$this->domainController = new DomainController($this->databaseConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -76,7 +75,7 @@ class RequestController
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
[$prefix,] = explode('.', $apiKey);
|
[$prefix,] = explode('.', $apiKey);
|
||||||
$apiUsers = new ApiKeys($this->dbConnection);
|
$apiUsers = new ApiKeys($this->databaseConnection);
|
||||||
$apiResult = $apiUsers->findByPrefix($prefix);
|
$apiResult = $apiUsers->findByPrefix($prefix);
|
||||||
$storedHash = $apiResult['api_token'];
|
$storedHash = $apiResult['api_token'];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue