mirror of
https://github.com/SECTL/SecScore.git
synced 2026-07-21 20:29:03 +08:00
整理并提交 Rust 端剩余改动
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user