feat(ccswitch): 添加一键导入和用量查询

This commit is contained in:
Entropy.Xu
2026-05-29 21:39:45 +08:00
parent 0d76a8e478
commit 7ed4b84654
23 changed files with 1720 additions and 48 deletions
@@ -505,6 +505,19 @@ pub(super) fn classify_public_support_route(
"public:payment",
false,
))
} else if method == http::Method::GET
&& matches!(
normalized_path,
"/api/ccswitch/usage" | "/api/ccswitch/usage/"
)
{
Some(classified(
"public_support",
"ccswitch",
"usage",
"aether:ccswitch_usage",
false,
))
} else if method == http::Method::GET
&& matches!(
normalized_path,
@@ -517,6 +530,7 @@ pub(super) fn classify_public_support_route(
| "/api/users/me/usage/heatmap"
| "/api/users/me/providers"
| "/api/users/me/available-models"
| "/api/users/me/client-config"
| "/api/users/me/endpoint-status"
| "/api/users/me/preferences"
| "/api/users/me/referral"
@@ -533,6 +547,7 @@ pub(super) fn classify_public_support_route(
"/api/users/me/usage/heatmap" => "usage_heatmap",
"/api/users/me/providers" => "providers",
"/api/users/me/available-models" => "available_models",
"/api/users/me/client-config" => "client_config",
"/api/users/me/endpoint-status" => "endpoint_status",
"/api/users/me/preferences" => "preferences",
"/api/users/me/referral" => "referral",