mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-04 16:37:46 +08:00
Merge upstream main into feat/500-api-key-ip-whitelist
This commit is contained in:
@@ -250,4 +250,19 @@ impl<'a> AdminAppState<'a> {
|
||||
crate::execution_runtime::execute_execution_runtime_sync_plan(self.app, trace_id, plan)
|
||||
.await
|
||||
}
|
||||
|
||||
pub(crate) async fn execute_execution_runtime_sync_plan_with_report_context(
|
||||
&self,
|
||||
trace_id: Option<&str>,
|
||||
plan: &aether_contracts::ExecutionPlan,
|
||||
report_context: Option<&serde_json::Value>,
|
||||
) -> Result<aether_contracts::ExecutionResult, GatewayError> {
|
||||
crate::execution_runtime::execute_execution_runtime_sync_plan_with_report_context(
|
||||
self.app,
|
||||
trace_id,
|
||||
plan,
|
||||
report_context,
|
||||
)
|
||||
.await
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,7 @@ use std::collections::BTreeMap;
|
||||
use std::io::Read;
|
||||
use url::Url;
|
||||
|
||||
const KIRO_IDC_AMZ_USER_AGENT: &str =
|
||||
"aws-sdk-js/3.738.0 ua/2.1 os/other lang/js md/browser#unknown_unknown api/sso-oidc#3.738.0 m/E KiroIDE";
|
||||
const KIRO_IDC_AMZ_USER_AGENT: &str = "aws-sdk-js/3.738.0 ua/2.1 os/other lang/js md/browser#unknown_unknown api/sso-oidc#3.738.0 m/E KiroIDE";
|
||||
const ADMIN_PROVIDER_OAUTH_TIMEOUT_MS: u64 = 30_000;
|
||||
const ADMIN_PROVIDER_OAUTH_PROXY_TIMEOUT_MS: u64 = 60_000;
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ impl<'a> AdminAppState<'a> {
|
||||
Json(json!({ "detail": "请求数据验证失败" })),
|
||||
)
|
||||
.into_response(),
|
||||
))
|
||||
));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1197,7 +1197,7 @@ impl<'a> AdminAppState<'a> {
|
||||
Err(_) => {
|
||||
return Ok(Err(invalid_request(format!(
|
||||
"Provider '{provider_name}' 配置格式无效"
|
||||
))))
|
||||
))));
|
||||
}
|
||||
};
|
||||
let mut updated = invalid!(
|
||||
@@ -1230,7 +1230,7 @@ impl<'a> AdminAppState<'a> {
|
||||
Err(_) => {
|
||||
return Ok(Err(invalid_request(format!(
|
||||
"Provider '{provider_name}' 配置格式无效"
|
||||
))))
|
||||
))));
|
||||
}
|
||||
};
|
||||
let (mut record, shift_existing_priorities_from) =
|
||||
@@ -1301,7 +1301,7 @@ impl<'a> AdminAppState<'a> {
|
||||
Err(_) => {
|
||||
return Ok(Err(invalid_request(
|
||||
"Provider Endpoint 配置格式无效",
|
||||
)))
|
||||
)));
|
||||
}
|
||||
};
|
||||
let (fields, payload) = patch.into_parts();
|
||||
@@ -1504,7 +1504,7 @@ impl<'a> AdminAppState<'a> {
|
||||
) {
|
||||
Ok(patch) => patch,
|
||||
Err(_) => {
|
||||
return Ok(Err(invalid_request("Provider Key 配置格式无效")))
|
||||
return Ok(Err(invalid_request("Provider Key 配置格式无效")));
|
||||
}
|
||||
};
|
||||
let mut updated = invalid!(
|
||||
@@ -1885,6 +1885,7 @@ impl<'a> AdminAppState<'a> {
|
||||
oauth_provider.extra_config,
|
||||
"extra_config",
|
||||
)),
|
||||
icon_url: None,
|
||||
is_enabled: oauth_provider.is_enabled,
|
||||
};
|
||||
invalid!(record.validate().map_err(|err| err.to_string()));
|
||||
@@ -1985,7 +1986,7 @@ impl<'a> AdminAppState<'a> {
|
||||
Err(_) => {
|
||||
return Ok(Err(invalid_request(
|
||||
"merge_mode 仅支持 skip / overwrite / error",
|
||||
)))
|
||||
)));
|
||||
}
|
||||
};
|
||||
let empty = Vec::new();
|
||||
|
||||
Reference in New Issue
Block a user