fix: get_user_quota 返回 was_paid 字段

This commit is contained in:
2026-05-25 13:45:55 +08:00
parent fed95531fe
commit e6e04979dc
2 changed files with 4 additions and 3 deletions

View File

@@ -1071,7 +1071,7 @@ pub async fn get_user_quota(
let is_maintenance = std::env::var("PAYMENT_MAINTENANCE_MODE").ok() == Some("true".to_string());
let (used, is_paid_active, paid_expires_at) =
let (used, is_paid_active, paid_expires_at, was_paid) =
db::get_user_quota(pool.get_ref(), user_id).await?;
// 维护模式使用更高的临时限额,但非会员仍然有限制防止滥用
@@ -1097,6 +1097,7 @@ pub async fn get_user_quota(
"unlimited": unlimited,
"is_paid_active": active,
"paid_expires_at": paid_expires_at,
"was_paid": was_paid,
"maintenance_mode": is_maintenance,
}
})))