mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-06-02 07:12:41 +00:00
5d23ef960e
* Remove SendActivity and Perform traits, rely on channel These traits arent necessary anymore now that websocket is removed. Removing them allows us to use normal actix http handler methods which are much more flexible, and allow using different middlewares as well as setting response attributes. * compiling and create post federating * clippy * rename methods, join outgoing activities task * fix api tests * no unwrap * conditional compile * add back getrandom * make crates optional * fmt
19 lines
429 B
Rust
19 lines
429 B
Rust
use actix_web::web::Data;
|
|
use lemmy_api_common::context::LemmyContext;
|
|
use lemmy_utils::error::LemmyError;
|
|
|
|
mod comment;
|
|
mod community;
|
|
mod custom_emoji;
|
|
pub mod post;
|
|
mod private_message;
|
|
mod site;
|
|
mod user;
|
|
|
|
#[async_trait::async_trait(?Send)]
|
|
pub trait PerformCrud {
|
|
type Response: serde::ser::Serialize + Send + Clone + Sync;
|
|
|
|
async fn perform(&self, context: &Data<LemmyContext>) -> Result<Self::Response, LemmyError>;
|
|
}
|