diff --git a/Source/API/script/Gateway/GatewayResponse.php b/Source/API/script/Gateway/GatewayResponse.php index 583a41c..287284c 100644 --- a/Source/API/script/Gateway/GatewayResponse.php +++ b/Source/API/script/Gateway/GatewayResponse.php @@ -68,7 +68,7 @@ class GatewayResponse */ public function getResponsesIdByIdListCandidate(int $listResponsesOfCandidateId): array { - $query = "SELECT r.id FROM `response` r, `submit` s WHERE s.responseCandidate = :id AND r.id = s.response"; + $query = "SELECT r.id FROM `response` r, `submit` s WHERE s.responsesCandidate = :id AND r.id = s.response"; $this->connection->executeQuery($query, array( ':id' => array($listResponsesOfCandidateId, PDO::PARAM_INT) )); diff --git a/Source/API/script/index.php b/Source/API/script/index.php index ea7c770..3371602 100644 --- a/Source/API/script/index.php +++ b/Source/API/script/index.php @@ -78,10 +78,6 @@ $app->delete('/deleteForm', function(Request $request, Response $response){ }); $app->get('/existsForm', function(Request $request, Response $response){ - $parameters = $request->getQueryParams(); - if (empty($parameters['id']) || empty($parameters['response'])){ - throw new TypeErrorParameters($request); - } try{ $response->getBody()->write(json_encode((new GatewayForm)->existsForm(), JSON_UNESCAPED_UNICODE)); }catch (PDOException $e){ @@ -188,7 +184,7 @@ $app->delete('/deleteKeyword', function(Request $request, Response $response){ return $response->withStatus(200); }); -$app->get('getAllKeyword', function(Request $request, Response $response){ +$app->get('/getAllKeyword', function(Request $request, Response $response){ try{ $response->getBody()->write(json_encode((new GatewayKeyword)->getAllKeyword(),JSON_UNESCAPED_UNICODE)); }catch (PDOException $e){