mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-01 17:00:21 +08:00
Preserve allowed IP defaults in admin key imports
This commit is contained in:
@@ -162,6 +162,7 @@ pub(super) async fn build_admin_create_api_key_response(
|
||||
allowed_providers,
|
||||
allowed_api_formats,
|
||||
allowed_models,
|
||||
allowed_ips: None,
|
||||
rate_limit: payload.rate_limit,
|
||||
concurrent_limit,
|
||||
force_capabilities: None,
|
||||
@@ -394,6 +395,7 @@ pub(super) async fn build_admin_update_api_key_response(
|
||||
allowed_providers,
|
||||
allowed_api_formats,
|
||||
allowed_models,
|
||||
allowed_ips: None,
|
||||
expires_at_present: field_presence.contains("expires_at"),
|
||||
expires_at_unix_secs: if field_presence.contains("expires_at") {
|
||||
effective_expires_at_unix_secs
|
||||
|
||||
@@ -2557,6 +2557,7 @@ impl<'a> AdminAppState<'a> {
|
||||
} else {
|
||||
None
|
||||
},
|
||||
allowed_ips: None,
|
||||
},
|
||||
)
|
||||
.await?;
|
||||
@@ -2625,6 +2626,7 @@ impl<'a> AdminAppState<'a> {
|
||||
allowed_providers,
|
||||
allowed_api_formats,
|
||||
allowed_models,
|
||||
allowed_ips: None,
|
||||
rate_limit,
|
||||
concurrent_limit,
|
||||
force_capabilities,
|
||||
@@ -2780,6 +2782,7 @@ impl<'a> AdminAppState<'a> {
|
||||
allowed_providers: Some(allowed_providers.clone()),
|
||||
allowed_api_formats: Some(allowed_api_formats.clone()),
|
||||
allowed_models: Some(allowed_models.clone()),
|
||||
allowed_ips: None,
|
||||
expires_at_present: false,
|
||||
expires_at_unix_secs: None,
|
||||
auto_delete_on_expiry_present: false,
|
||||
@@ -2840,6 +2843,7 @@ impl<'a> AdminAppState<'a> {
|
||||
allowed_providers,
|
||||
allowed_api_formats,
|
||||
allowed_models,
|
||||
allowed_ips: None,
|
||||
rate_limit: Some(rate_limit),
|
||||
concurrent_limit,
|
||||
force_capabilities,
|
||||
|
||||
Reference in New Issue
Block a user