fix(account): update sync range and handle all-mode reset

This commit is contained in:
rustmailer
2025-12-31 22:57:20 +08:00
parent a6216c2ce6
commit ef891b20c3
3 changed files with 22 additions and 13 deletions
+7 -12
View File
@@ -195,13 +195,6 @@ impl AccountV3 {
ErrorCode::ResourceNotFound
)
})?;
// if !account.enabled {
// return Err(raise_error!(
// format!("Account id='{account_id}' is disabled"),
// ErrorCode::AccountDisabled
// ));
// }
Ok(account)
}
@@ -221,11 +214,6 @@ impl AccountV3 {
.await
}
// /// Saves the current `AccountEntity` by persisting it to storage.
// pub async fn save(&self) -> BichonResult<()> {
// insert_impl(DB_MANAGER.meta_db(), self.to_owned()).await
// }
pub async fn create_account(
user_id: u64,
request: AccountCreateRequest,
@@ -420,6 +408,13 @@ impl AccountV3 {
new.date_since = None;
}
if let Some(clear_date_range) = request.clear_date_range {
if clear_date_range {
new.date_since = None;
new.date_before = None;
}
}
if let Some(folder_limit) = request.folder_limit {
new.folder_limit = Some(folder_limit);
}