From db90f0631abac53502228a0fa0c487ef5b4189de Mon Sep 17 00:00:00 2001 From: zyycn Date: Sun, 2 Aug 2026 00:24:18 +0800 Subject: [PATCH] refactor(store): make admin api key comments functional Co-Authored-By: Claude Fable 5 --- backend/crates/gateway-store/src/postgres/mod.rs | 2 +- backend/crates/gateway-store/src/postgres/runtime_settings.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/crates/gateway-store/src/postgres/mod.rs b/backend/crates/gateway-store/src/postgres/mod.rs index 3a6f4143d..a680f57db 100644 --- a/backend/crates/gateway-store/src/postgres/mod.rs +++ b/backend/crates/gateway-store/src/postgres/mod.rs @@ -81,7 +81,7 @@ pub trait ControlPlaneRepository: Send + Sync { replacement: ControlPlaneReplacement, ) -> StoreResult; - /// 字段级更新 admin_api_key,不影响其它运行设置。 + /// 更新 admin_api_key 字段并推进 config revision。 async fn replace_admin_api_key( &self, admin_api_key: Option, diff --git a/backend/crates/gateway-store/src/postgres/runtime_settings.rs b/backend/crates/gateway-store/src/postgres/runtime_settings.rs index 68489e515..5a637747a 100644 --- a/backend/crates/gateway-store/src/postgres/runtime_settings.rs +++ b/backend/crates/gateway-store/src/postgres/runtime_settings.rs @@ -320,7 +320,7 @@ pub(crate) async fn bump_config_revision_in_transaction( Revision::new(u64::try_from(next).map_err(|_| invalid_numeric())?) } -/// 只更新 admin_api_key,不触碰其它运行设置字段。 +/// 更新 admin_api_key 字段,config revision 由调用方 bump。 pub(crate) async fn update_admin_api_key_in_transaction( transaction: &mut Transaction<'_, Postgres>, admin_api_key: Option,