refactor: store typed WrapUpReport in domain, serialize in adapters
Some checks failed
CI / Check / Test (push) Failing after 45s
Some checks failed
CI / Check / Test (push) Failing after 45s
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user