fix(trash)+refactor(file life cycle)
* fix issue with the empty trash (wasn't calling thumbnail clean up) * refactor file service life cycle (TrashService don't call directly ThumbnailService, but call the on_file_deleted() hook * remove unused mehod: _validate_user_ownership()
This commit is contained in:
@@ -402,6 +402,11 @@ impl TrashRepository for MockTrashRepository {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn get_all_trashed_file_ids(&self, _user_id: &Uuid) -> Result<Vec<String>> {
|
||||
let files = self.trashed_files.lock().unwrap();
|
||||
Ok(files.keys().cloned().collect())
|
||||
}
|
||||
|
||||
async fn delete_expired_bulk(&self) -> Result<(u64, u64)> {
|
||||
let mut items = self.trash_items.lock().unwrap();
|
||||
let now = Utc::now();
|
||||
|
||||
Reference in New Issue
Block a user