TEMP : update some route with composer.json, modify the config.php file all the gateways call
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
c053d20473
commit
e45cc654c3
@ -1,26 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace Connect;
|
||||
|
||||
|
||||
use Config\Connection;
|
||||
use PDOException;
|
||||
|
||||
require_once __DIR__ ."/Connection.php";
|
||||
|
||||
class ConnectClass{
|
||||
|
||||
function connect(): int|Connection
|
||||
{
|
||||
function connect(): int|Connection
|
||||
{
|
||||
|
||||
$dsn = "mysql:host=".$_ENV["HOST"].";dbname=".$_ENV["DATABASE"].";";
|
||||
$login = $_ENV["USER"];
|
||||
$password = $_ENV["PASSWORD"];
|
||||
$dsn = "mysql:host=".$_ENV["HOST"].";dbname=".$_ENV["DATABASE"].";";
|
||||
$login = $_ENV["USER"];
|
||||
$password = $_ENV["PASSWORD"];
|
||||
|
||||
try {
|
||||
try {
|
||||
|
||||
$connection = new Connection($dsn,$login,$password);
|
||||
$connection = new Connection($dsn,$login,$password);
|
||||
|
||||
}catch (PDOException){
|
||||
}catch (PDOException){
|
||||
|
||||
http_response_code(404);
|
||||
return http_response_code();
|
||||
http_response_code(404);
|
||||
return http_response_code();
|
||||
}
|
||||
return $connection;
|
||||
}
|
||||
return $connection;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in new issue