优化错误报告更新响应
PATCH 更新直接返回元数据,避免重复下载归档 管理后台保留已加载详情并合并最新状态
This commit is contained in:
@@ -339,7 +339,7 @@ pub async fn admin_update_error_report(
|
||||
{
|
||||
return Err(bad_request("处理备注不能超过 2000 个字符"));
|
||||
}
|
||||
state
|
||||
let updated = state
|
||||
.spacetime_client()
|
||||
.update_error_report(ErrorReportUpdateRecordInput {
|
||||
batch_id: batch_id.clone(),
|
||||
@@ -356,13 +356,27 @@ pub async fn admin_update_error_report(
|
||||
Some(&batch_id),
|
||||
)
|
||||
.await;
|
||||
admin_get_error_report(
|
||||
State(state),
|
||||
Extension(ctx),
|
||||
Extension(admin),
|
||||
AxumPath(batch_id),
|
||||
)
|
||||
.await
|
||||
Ok(json_success_body(
|
||||
Some(&ctx),
|
||||
AdminErrorReportEntry {
|
||||
batch_id: updated.batch_id,
|
||||
event_count: updated.event_count,
|
||||
log_count: updated.log_count,
|
||||
fingerprint: updated.first_fingerprint,
|
||||
source: updated.first_source,
|
||||
status: updated.review_status.clone(),
|
||||
user_id: updated.user_id,
|
||||
created_at: updated.created_at,
|
||||
updated_at: updated.updated_at,
|
||||
user_description: None,
|
||||
attachment_size_bytes: updated.archive_size_bytes,
|
||||
submission_id: Some(updated.submission_id),
|
||||
oss_object_key: Some(updated.object_key),
|
||||
archive_sha256: Some(updated.archive_sha256),
|
||||
upload_status: Some("ready".into()),
|
||||
review_status: Some(updated.review_status),
|
||||
},
|
||||
))
|
||||
}
|
||||
|
||||
pub async fn admin_download_error_report(
|
||||
|
||||
Reference in New Issue
Block a user