Removed sql debug logging in Preorder API

This commit is contained in:
Frank Schubert
2024-07-04 21:15:49 +02:00
parent bb49f6e588
commit 0640babfa3

View File

@@ -529,7 +529,7 @@ class PreorderApicontroller extends mfBaseApicontroller {
} }
$sql = "SELECT * FROM view_hausnummer WHERE $where"; $sql = "SELECT * FROM view_hausnummer WHERE $where";
$this->log->debug($sql); //$this->log->debug($sql);
$res = $this->db()->query($sql); $res = $this->db()->query($sql);
// If not found, try with Ortschaft in front of strasse (liezen gwr issue) // If not found, try with Ortschaft in front of strasse (liezen gwr issue)
@@ -561,7 +561,7 @@ class PreorderApicontroller extends mfBaseApicontroller {
} }
$sql = "SELECT * FROM view_hausnummer WHERE $where"; $sql = "SELECT * FROM view_hausnummer WHERE $where";
$this->log->debug($sql); //$this->log->debug($sql);
$res = $this->db()->query($sql); $res = $this->db()->query($sql);
if(!$this->db()->num_rows($res)) { if(!$this->db()->num_rows($res)) {
return mfResponse::NotFound(['message' => "Adresse nicht gefunden"]); return mfResponse::NotFound(['message' => "Adresse nicht gefunden"]);
@@ -620,7 +620,7 @@ class PreorderApicontroller extends mfBaseApicontroller {
} }
$sql = "SELECT * FROM view_wohneinheit WHERE $where AND hausnummer_id=".$address->hausnummer_id; $sql = "SELECT * FROM view_wohneinheit WHERE $where AND hausnummer_id=".$address->hausnummer_id;
$this->log->debug($sql); //$this->log->debug($sql);
$res = $this->db()->query($sql); $res = $this->db()->query($sql);
if($this->db()->num_rows($res)) { if($this->db()->num_rows($res)) {
$unit = $this->db()->fetch_object($res); $unit = $this->db()->fetch_object($res);
@@ -644,7 +644,7 @@ class PreorderApicontroller extends mfBaseApicontroller {
} }
$sql = "SELECT * FROM view_wohneinheit WHERE $where"; $sql = "SELECT * FROM view_wohneinheit WHERE $where";
$this->log->debug($sql); //$this->log->debug($sql);
$res = $this->db()->query($sql); $res = $this->db()->query($sql);
$found_units_count = $this->db()->num_rows($res); $found_units_count = $this->db()->num_rows($res);
@@ -928,7 +928,7 @@ class PreorderApicontroller extends mfBaseApicontroller {
$where .= " AND wohneinheit_id NOT IN (". implode(",",$exclude_wohneinheit_ids).")"; $where .= " AND wohneinheit_id NOT IN (". implode(",",$exclude_wohneinheit_ids).")";
} }
$sql = "SELECT * FROM view_wohneinheit WHERE $where"; $sql = "SELECT * FROM view_wohneinheit WHERE $where";
$this->log->debug($sql); //$this->log->debug($sql);
$res = $this->db()->query($sql); $res = $this->db()->query($sql);
if(!$this->db()->num_rows($res)) { if(!$this->db()->num_rows($res)) {
return mfResponse::Forbidden(['message' => "Keine Wohneinheiten verfügbar"]); return mfResponse::Forbidden(['message' => "Keine Wohneinheiten verfügbar"]);