post services integrations

This commit is contained in:
2026-07-29 18:09:38 +02:00
parent 6cb9acf98b
commit 759bc1dc15
23 changed files with 956 additions and 95 deletions
-3
View File
@@ -32,13 +32,11 @@ impl ChannelRepository {
pub async fn update(&self, active: channel::ActiveModel) -> AnyResult<channel::Model> {
let channel = active.update(&self.context.db).await?;
self.context.events.emit("channel_updated", channel.clone());
Ok(channel)
}
pub async fn create(&self, active: channel::ActiveModel) -> AnyResult<channel::Model> {
let channel = active.insert(&self.context.db).await?;
self.context.events.emit("channel_created", channel.clone());
Ok(channel)
}
@@ -46,7 +44,6 @@ impl ChannelRepository {
let res = channel::Entity::delete_by_id(id)
.exec(&self.context.db)
.await?;
self.context.events.emit("channel_deleted", id);
Ok(res.rows_affected > 0)
}