Flesh out some more interface methods for the Channel Repository
This commit is contained in:
parent
a7826d5056
commit
065f1a0cb1
@ -90,10 +90,13 @@ class ChannelRepository implements ChannelRepositoryInterface
|
||||
return $this->createChannelFromResults($results->resultRows[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws Throwable
|
||||
*/
|
||||
public function create(Channel $channel, User $owner): int
|
||||
{
|
||||
$query = "INSERT INTO channels
|
||||
(name, slug, description, link, language, copyright, explicit, owner_id)
|
||||
$query = "INSERT INTO channels (name, slug, description, link,
|
||||
language, copyright, explicit, owner_id)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?)";
|
||||
|
||||
$results = await($this->db->query($query, [
|
||||
@ -109,4 +112,14 @@ class ChannelRepository implements ChannelRepositoryInterface
|
||||
|
||||
return $results->insertId;
|
||||
}
|
||||
|
||||
public function update(Channel $channel): bool
|
||||
{
|
||||
$query = "UPDATE channels SET ";
|
||||
}
|
||||
|
||||
public function delete(Channel $channel): bool
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user