diff options
Diffstat (limited to 'src/channel/app.rs')
| -rw-r--r-- | src/channel/app.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/channel/app.rs b/src/channel/app.rs index 0409076..75c662d 100644 --- a/src/channel/app.rs +++ b/src/channel/app.rs @@ -23,9 +23,9 @@ impl<'a> Channels<'a> { pub async fn create(&self, name: &str, created_at: &DateTime) -> Result<Channel, CreateError> { let mut tx = self.db.begin().await?; let created = tx.sequence().next(created_at).await?; - let channel = tx.channels().create(name, &created).await?; - tx.channels() - .reserve_name(&channel, name) + let channel = tx + .channels() + .create(name, &created) .await .duplicate(|| CreateError::DuplicateName(name.into()))?; tx.commit().await?; |
