mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-03 01:40: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_providers,
|
||||||
allowed_api_formats,
|
allowed_api_formats,
|
||||||
allowed_models,
|
allowed_models,
|
||||||
|
allowed_ips: None,
|
||||||
rate_limit: payload.rate_limit,
|
rate_limit: payload.rate_limit,
|
||||||
concurrent_limit,
|
concurrent_limit,
|
||||||
force_capabilities: None,
|
force_capabilities: None,
|
||||||
@@ -394,6 +395,7 @@ pub(super) async fn build_admin_update_api_key_response(
|
|||||||
allowed_providers,
|
allowed_providers,
|
||||||
allowed_api_formats,
|
allowed_api_formats,
|
||||||
allowed_models,
|
allowed_models,
|
||||||
|
allowed_ips: None,
|
||||||
expires_at_present: field_presence.contains("expires_at"),
|
expires_at_present: field_presence.contains("expires_at"),
|
||||||
expires_at_unix_secs: if field_presence.contains("expires_at") {
|
expires_at_unix_secs: if field_presence.contains("expires_at") {
|
||||||
effective_expires_at_unix_secs
|
effective_expires_at_unix_secs
|
||||||
|
|||||||
@@ -2557,6 +2557,7 @@ impl<'a> AdminAppState<'a> {
|
|||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
},
|
},
|
||||||
|
allowed_ips: None,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
@@ -2625,6 +2626,7 @@ impl<'a> AdminAppState<'a> {
|
|||||||
allowed_providers,
|
allowed_providers,
|
||||||
allowed_api_formats,
|
allowed_api_formats,
|
||||||
allowed_models,
|
allowed_models,
|
||||||
|
allowed_ips: None,
|
||||||
rate_limit,
|
rate_limit,
|
||||||
concurrent_limit,
|
concurrent_limit,
|
||||||
force_capabilities,
|
force_capabilities,
|
||||||
@@ -2780,6 +2782,7 @@ impl<'a> AdminAppState<'a> {
|
|||||||
allowed_providers: Some(allowed_providers.clone()),
|
allowed_providers: Some(allowed_providers.clone()),
|
||||||
allowed_api_formats: Some(allowed_api_formats.clone()),
|
allowed_api_formats: Some(allowed_api_formats.clone()),
|
||||||
allowed_models: Some(allowed_models.clone()),
|
allowed_models: Some(allowed_models.clone()),
|
||||||
|
allowed_ips: None,
|
||||||
expires_at_present: false,
|
expires_at_present: false,
|
||||||
expires_at_unix_secs: None,
|
expires_at_unix_secs: None,
|
||||||
auto_delete_on_expiry_present: false,
|
auto_delete_on_expiry_present: false,
|
||||||
@@ -2840,6 +2843,7 @@ impl<'a> AdminAppState<'a> {
|
|||||||
allowed_providers,
|
allowed_providers,
|
||||||
allowed_api_formats,
|
allowed_api_formats,
|
||||||
allowed_models,
|
allowed_models,
|
||||||
|
allowed_ips: None,
|
||||||
rate_limit: Some(rate_limit),
|
rate_limit: Some(rate_limit),
|
||||||
concurrent_limit,
|
concurrent_limit,
|
||||||
force_capabilities,
|
force_capabilities,
|
||||||
|
|||||||
Reference in New Issue
Block a user