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