mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-09-08 16:16:44 +00:00
16 lines
512 B
Rust
16 lines
512 B
Rust
![]() |
use crate::{
|
||
|
entities::{trash::RepeatedTrash, view::RepeatedView},
|
||
|
errors::WorkspaceError,
|
||
|
services::TrashController,
|
||
|
};
|
||
|
use flowy_dispatch::prelude::{data_result, Data, DataResult, Unit};
|
||
|
use std::{convert::TryInto, sync::Arc};
|
||
|
|
||
|
#[tracing::instrument(skip(data, controller), err)]
|
||
|
pub(crate) async fn read_trash_handler(
|
||
|
controller: Unit<Arc<TrashController>>,
|
||
|
) -> DataResult<RepeatedTrash, WorkspaceError> {
|
||
|
let repeated_trash = controller.read_trash()?;
|
||
|
data_result(repeated_trash)
|
||
|
}
|