2022-11-28 09:29:33 -05:00
|
|
|
use actix_web::web::Data;
|
|
|
|
use lemmy_api_common::context::LemmyContext;
|
2022-06-02 10:33:41 -04:00
|
|
|
use lemmy_utils::{error::LemmyError, ConnectionId};
|
2021-03-25 15:19:40 -04:00
|
|
|
|
|
|
|
mod comment;
|
|
|
|
mod community;
|
2023-03-20 17:32:31 -04:00
|
|
|
mod custom_emoji;
|
2021-03-25 15:19:40 -04:00
|
|
|
mod post;
|
|
|
|
mod private_message;
|
|
|
|
mod site;
|
|
|
|
mod user;
|
|
|
|
|
|
|
|
#[async_trait::async_trait(?Send)]
|
|
|
|
pub trait PerformCrud {
|
|
|
|
type Response: serde::ser::Serialize + Send;
|
|
|
|
|
|
|
|
async fn perform(
|
|
|
|
&self,
|
|
|
|
context: &Data<LemmyContext>,
|
|
|
|
websocket_id: Option<ConnectionId>,
|
|
|
|
) -> Result<Self::Response, LemmyError>;
|
|
|
|
}
|