Fixed some variable referencing errors
This commit is contained in:
parent
02f8e48f11
commit
c00263e072
|
@ -72,7 +72,7 @@ class Records
|
||||||
$this->logger->debug('User tries to add record for invalid domain.');
|
$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);
|
return $res->withJson(['error' => 'The domain does not exist or is neighter MASTER nor NATIVE.'], 404);
|
||||||
} catch (\Exceptions\SemanticException $e) {
|
} 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);
|
return $res->withJson(['error' => 'The provided type is invalid.'], 400);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -118,7 +118,7 @@ class Records
|
||||||
$this->logger->debug('Get record info', ['id' => $recordId]);
|
$this->logger->debug('Get record info', ['id' => $recordId]);
|
||||||
return $res->withJson($result, 200);
|
return $res->withJson($result, 200);
|
||||||
} catch (\Exceptions\NotFoundException $e) {
|
} 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -143,7 +143,7 @@ class Credentials
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = $this->db->prepare('DELETE FROM remote WHERE id=:id');
|
$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();
|
$query->execute();
|
||||||
|
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
|
|
Loading…
Reference in a new issue