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
|
|
|
|
2023-07-28 14:39:38 +00:00
|
|
|
pub mod comment;
|
|
|
|
pub mod community;
|
|
|
|
pub mod custom_emoji;
|
2023-07-19 13:49:41 +00:00
|
|
|
pub mod post;
|
2023-07-28 14:39:38 +00:00
|
|
|
pub mod private_message;
|
|
|
|
pub mod site;
|
|
|
|
pub mod user;
|
2021-03-25 19:19:40 +00:00
|
|
|
|
|
|
|
#[async_trait::async_trait(?Send)]
|
|
|
|
pub trait PerformCrud {
|
2023-07-10 10:27:49 +00:00
|
|
|
type Response: serde::ser::Serialize + Send + Clone + Sync;
|
2021-03-25 19:19:40 +00:00
|
|
|
|
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
|
|
|
}
|