This commit is contained in:
Alexey
2026-10-19 00:15:27 +03:00
parent a99b548aa1
commit 6fdc2a5ba4
43 changed files with 2764 additions and 159 deletions
+7 -1
View File
@@ -51,6 +51,7 @@ pub(in crate::api) async fn users_from_config(
.get(&username)
.map(chrono::DateTime::<chrono::Utc>::to_rfc3339),
data_quota_bytes: cfg.access.user_data_quota.get(&username).copied(),
quota_period: cfg.access.user_quota_periods.get(&username).copied(),
rate_limit_up_bps: cfg
.access
.user_rate_limits
@@ -102,7 +103,12 @@ pub(in crate::api) fn build_user_quota_list(cfg: &ProxyConfig, stats: &Stats) ->
.map(|entry| (entry.used_bytes, entry.last_reset_epoch_secs))
.unwrap_or((0, 0));
users.push(UserQuotaEntry {
username,
username: username.clone(),
quota_period: cfg.access.user_quota_periods.get(&username).copied(),
schedule: crate::stats::QuotaScheduleStatus {
quota_schedule_state: "disabled",
..Default::default()
},
data_quota_bytes,
used_bytes,
last_reset_epoch_secs,