diff --git a/backend/src/controllers/Records.php b/backend/src/controllers/Records.php index 9604901..0000496 100644 --- a/backend/src/controllers/Records.php +++ b/backend/src/controllers/Records.php @@ -72,7 +72,7 @@ class Records $this->logger->debug('User tries to add record for invalid domain.'); return $res->withJson(['error' => 'The domain does not exist or is neighter MASTER nor NATIVE.'], 404); } catch (\Exceptions\SemanticException $e) { - $this->logger->debug('User tries to add record with invalid type.', ['type' => $type]); + $this->logger->debug('User tries to add record with invalid type.', ['type' => $body['type']]); return $res->withJson(['error' => 'The provided type is invalid.'], 400); } } @@ -118,7 +118,7 @@ class Records $this->logger->debug('Get record info', ['id' => $recordId]); return $res->withJson($result, 200); } catch (\Exceptions\NotFoundException $e) { - return $res->withJson(['error' => 'No record found for id ' . $domainId], 404); + return $res->withJson(['error' => 'No record found for id ' . $recordId], 404); } } diff --git a/backend/src/operations/Credentials.php b/backend/src/operations/Credentials.php index 03a466e..5664842 100644 --- a/backend/src/operations/Credentials.php +++ b/backend/src/operations/Credentials.php @@ -143,7 +143,7 @@ class Credentials } $query = $this->db->prepare('DELETE FROM remote WHERE id=:id'); - $query->bindValue(':id', $id, \PDO::PARAM_INT); + $query->bindValue(':id', $credentialId, \PDO::PARAM_INT); $query->execute(); $this->db->commit();