mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-09 18:59:50 +08:00
refactor: 拆分 admin handler 大文件为模块目录,消除 shared.rs 反模式
- endpoint_keys/pool/architecture 等大文件拆分为独立模块目录 - 删除 crud/query/strategy/system 中的 shared.rs,内容归位到各自模块 - endpoints_admin/models/oauth/write 等模块拆出 payloads/responses/support 子文件 - system/core 下多个 *_routes.rs 合并到 system_routes.rs - 更新 refactor-execution-plan 文档进度
This commit is contained in:
@@ -1 +0,0 @@
|
||||
pub(super) use crate::handlers::admin::provider::endpoint_keys::maybe_build_local_admin_endpoints_keys_response;
|
||||
@@ -1,4 +1,5 @@
|
||||
use crate::control::GatewayPublicRequestContext;
|
||||
use crate::handlers::admin::provider::{endpoint_keys, endpoints_admin};
|
||||
use crate::{AppState, GatewayError};
|
||||
use axum::body::{Body, Bytes};
|
||||
use axum::http::Response;
|
||||
@@ -6,8 +7,6 @@ use axum::http::Response;
|
||||
mod extractors;
|
||||
mod health;
|
||||
mod health_builders;
|
||||
mod keys;
|
||||
mod routes;
|
||||
mod rpm;
|
||||
|
||||
pub(crate) use self::health_builders::build_admin_endpoint_health_status_payload;
|
||||
@@ -29,14 +28,17 @@ pub(crate) async fn maybe_build_local_admin_endpoints_response(
|
||||
return Ok(Some(response));
|
||||
}
|
||||
|
||||
if let Some(response) =
|
||||
keys::maybe_build_local_admin_endpoints_keys_response(state, request_context, request_body)
|
||||
.await?
|
||||
if let Some(response) = endpoint_keys::maybe_build_local_admin_endpoints_keys_response(
|
||||
state,
|
||||
request_context,
|
||||
request_body,
|
||||
)
|
||||
.await?
|
||||
{
|
||||
return Ok(Some(response));
|
||||
}
|
||||
|
||||
if let Some(response) = routes::maybe_build_local_admin_endpoints_routes_response(
|
||||
if let Some(response) = endpoints_admin::maybe_build_local_admin_endpoints_routes_response(
|
||||
state,
|
||||
request_context,
|
||||
request_body,
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
pub(super) use crate::handlers::admin::provider::endpoints_admin::maybe_build_local_admin_endpoints_routes_response;
|
||||
Reference in New Issue
Block a user