mirror of
https://github.com/SECTL/SecScore.git
synced 2026-07-19 19:04:23 +08:00
refactor: 优化代码结构并修复多个问题
修复 ruleComponent.tsx 和 ruleBuilderUtils.ts 中 queryToAutoScoreRule 函数的参数问题 调整 database.rs 中 state_guard 的 drop 位置 优化 EventEmitter 和 Context 中的 once 方法实现 移除 Sidebar.tsx 和 OOBE.tsx 中未使用的代码 格式化 MCP 使用文档和规则文件
This commit is contained in:
@@ -1061,7 +1061,6 @@ pub async fn db_switch_connection(
|
||||
Some("database"),
|
||||
None,
|
||||
);
|
||||
drop(state_guard);
|
||||
|
||||
let (db_type, saved_connection_string, saved_status, conn) = if connection_string
|
||||
.starts_with("postgres://")
|
||||
@@ -1170,6 +1169,7 @@ pub async fn db_switch_connection(
|
||||
conn,
|
||||
)
|
||||
};
|
||||
drop(state_guard);
|
||||
|
||||
{
|
||||
let settings_db_path = sqlite_db_path(&app_handle)?;
|
||||
|
||||
Reference in New Issue
Block a user