This commit is contained in:
@@ -46,6 +46,15 @@ class Repository
|
||||
$this->db->pdo()->prepare("DELETE FROM log_sources WHERE id = ?")->execute([$id]);
|
||||
}
|
||||
|
||||
public function updateSource(int $id, string $name, LogSourceType $type, string $address, array $labels = [], bool $active = true): LogSource
|
||||
{
|
||||
$stmt = $this->db->pdo()->prepare(
|
||||
"UPDATE log_sources SET name = ?, type = ?, address = ?, labels = ?, active = ? WHERE id = ?"
|
||||
);
|
||||
$stmt->execute([$name, $type->value, $address, json_encode($labels), (int) $active, $id]);
|
||||
return $this->getSource($id);
|
||||
}
|
||||
|
||||
// --- Rules ---
|
||||
|
||||
public function getRules(): array
|
||||
|
||||
Reference in New Issue
Block a user