Execute database script 4
continuous-integration/drone/push Build is passing Details

master
dorian.hodin 2 years ago
parent cce01efc3c
commit 2c34912bba

@ -4,6 +4,7 @@ namespace Gateway;
use Config\ConnectClass;
use Config\Connection;
use Config\ScriptDatabase;
use PDO;
use PDOException;
@ -15,6 +16,8 @@ class GatewayForm
{
try{
$this->connection = (new ConnectClass)->connect();
(new ScriptDatabase)->executeScript();
}catch(PDOException $e){
throw new PDOException($e->getMessage(), $e->getCode(), $e);
}

@ -1,6 +1,5 @@
<?php
use Config\ScriptDatabase;
use ExceptionHandle\HttpNotFoundError;
use ExceptionHandle\PDOError;
use ExceptionHandle\TypeErrorMethod;
@ -32,7 +31,6 @@ $errorMiddleware = $app->addErrorMiddleware(true, true, true);
*/
$app->get('/', function (Request $request, Response $response) {
$parameters = $request->getQueryParams();
(new ScriptDatabase)->executeScript();
if (empty($parameters['method'])){
throw new TypeErrorMethod($request);
}else{

Loading…
Cancel
Save