API User Deletion fixes

This commit is contained in:
Alexey 2026-03-10 00:04:38 +03:00
parent fabb3c45f1
commit 796279343e
No known key found for this signature in database
1 changed files with 9 additions and 1 deletions

View File

@ -205,7 +205,15 @@ pub(super) async fn patch_user(
cfg.validate() cfg.validate()
.map_err(|e| ApiFailure::bad_request(format!("config validation failed: {}", e)))?; .map_err(|e| ApiFailure::bad_request(format!("config validation failed: {}", e)))?;
let revision = save_config_to_disk(&shared.config_path, &cfg).await?; let touched_sections = [
AccessSection::Users,
AccessSection::UserAdTags,
AccessSection::UserMaxTcpConns,
AccessSection::UserExpirations,
AccessSection::UserDataQuota,
AccessSection::UserMaxUniqueIps,
];
let revision = save_access_sections_to_disk(&shared.config_path, &cfg, &touched_sections).await?;
drop(_guard); drop(_guard);
if let Some(limit) = updated_limit { if let Some(limit) = updated_limit {
shared.ip_tracker.set_user_limit(user, limit).await; shared.ip_tracker.set_user_limit(user, limit).await;