Preserve allowed IP defaults in admin key imports

This commit is contained in:
RWDai
2026-05-18 20:47:57 +08:00
parent ab53326865
commit d8f68c1d9a
2 changed files with 6 additions and 0 deletions
@@ -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