diff --git a/app/src/Domain/Repository/Channel/ChannelRepository.php b/app/src/Domain/Repository/Channel/ChannelRepository.php index 1f06d86..c42859f 100644 --- a/app/src/Domain/Repository/Channel/ChannelRepository.php +++ b/app/src/Domain/Repository/Channel/ChannelRepository.php @@ -1,4 +1,4 @@ -db->query($query, [ $channel->getName(), @@ -120,13 +122,16 @@ class ChannelRepository implements ChannelRepositoryInterface */ public function update(Channel $channel): bool { - $query = "UPDATE channels SET name = ?, - slug = ?, - description = ?, - link = ?, - language = ?, - copyright = ?, - explicit = ?"; + $query = <<db->query($query, [ $channel->getName(), @@ -136,6 +141,7 @@ class ChannelRepository implements ChannelRepositoryInterface $channel->getLanguage(), $channel->getCopyright(), $channel->isExplicit(), + $channel->getId(), ])); return (bool) $results->affectedRows; diff --git a/app/src/Infrastructure/Api/Database/ConnectionInterface.php b/app/src/Infrastructure/Api/Database/ConnectionInterface.php new file mode 100644 index 0000000..0cc7599 --- /dev/null +++ b/app/src/Infrastructure/Api/Database/ConnectionInterface.php @@ -0,0 +1,8 @@ +