feat(webhooks): wire event bus into state, routes, and scheduler

This commit is contained in:
2026-03-16 00:41:50 +01:00
parent 5c978389b2
commit 425a6898e4
6 changed files with 88 additions and 20 deletions

View File

@@ -7,7 +7,7 @@ use axum::{
use chrono::Utc;
use uuid::Uuid;
use domain::DomainError;
use domain::{self, DomainError};
use crate::{
dto::ScheduleResponse,
@@ -33,6 +33,10 @@ pub(super) async fn generate_schedule(
.generate_schedule(channel_id, Utc::now())
.await?;
let _ = state.event_tx.send(domain::DomainEvent::ScheduleGenerated {
channel_id,
schedule: schedule.clone(),
});
Ok((StatusCode::CREATED, Json(ScheduleResponse::from(schedule))))
}