refactor: store typed WrapUpReport in domain, serialize in adapters
Some checks failed
CI / Check / Test (push) Failing after 45s

This commit is contained in:
2026-06-03 01:24:02 +02:00
parent e4b8ba550e
commit d94ccbe057
9 changed files with 33 additions and 32 deletions

View File

@@ -39,7 +39,7 @@ pub async fn execute(ctx: &AppContext, cmd: RequestWrapUpCommand) -> Result<Wrap
start_date: date_range.start(),
end_date: date_range.end(),
status: WrapUpStatus::Pending,
report_json: None,
report: None,
error_message: None,
created_at: Utc::now().naive_utc(),
completed_at: None,

View File

@@ -40,11 +40,9 @@ pub async fn execute(
match compute::execute(ctx, query).await {
Ok(report) => {
let json = serde_json::to_string(&report)
.map_err(|e| DomainError::InfrastructureError(e.to_string()))?;
ctx.repos
.wrapup_repo
.set_complete(&wrapup_id, &json)
.set_complete(&wrapup_id, &report)
.await?;
if let Some(ref renderer) = ctx.services.video_renderer {