mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 17:30:23 +08:00
fix: preserve selected keys for quota refresh
This commit is contained in:
@@ -65,7 +65,7 @@ pub(super) async fn maybe_handle(
|
||||
|
||||
let normalized_provider_type = provider.provider_type.trim().to_ascii_lowercase();
|
||||
|
||||
let payload = if let Some(request_body) = request_body {
|
||||
let payload = if let Some(request_body) = request_body.filter(|body| !body.is_empty()) {
|
||||
match serde_json::from_slice::<AdminProviderQuotaRefreshRequest>(request_body) {
|
||||
Ok(payload) => payload,
|
||||
Err(_) => {
|
||||
|
||||
@@ -220,6 +220,7 @@ pub(crate) fn admin_proxy_local_requires_buffered_body(
|
||||
(Some("endpoints_manage"), http::Method::POST, Some("create_provider_key"))
|
||||
| (Some("endpoints_manage"), http::Method::POST, Some("create_endpoint"))
|
||||
| (Some("endpoints_manage"), http::Method::POST, Some("batch_delete_keys"))
|
||||
| (Some("endpoints_manage"), http::Method::POST, Some("refresh_quota"))
|
||||
| (Some("endpoints_manage"), http::Method::PUT, Some("update_key"))
|
||||
| (Some("endpoints_manage"), http::Method::PUT, Some("update_endpoint"))
|
||||
| (Some("modules_manage"), http::Method::PUT, Some("set_enabled"))
|
||||
|
||||
Reference in New Issue
Block a user