整理并提交 Rust 端剩余改动

This commit is contained in:
JSR
2026-03-20 18:43:07 +08:00
parent 61f3b24a1c
commit aed72b111b
6 changed files with 49 additions and 49 deletions
+8 -8
View File
@@ -117,14 +117,14 @@ pub async fn reason_create(
updated_at: Set(now),
};
match new_reason.insert(conn).await {
Ok(inserted) => {
realtime_dual_write_sync(state.inner()).await?;
Ok(IpcResponse::success(inserted.id))
}
Err(e) => Ok(IpcResponse::error(&format!(
"Failed to create reason: {}",
e
match new_reason.insert(conn).await {
Ok(inserted) => {
realtime_dual_write_sync(state.inner()).await?;
Ok(IpcResponse::success(inserted.id))
}
Err(e) => Ok(IpcResponse::error(&format!(
"Failed to create reason: {}",
e
))),
}
} else {