2023-03-21 15:03:05 +00:00
|
|
|
use activitypub_federation::config::Data;
|
2022-11-28 14:29:33 +00:00
|
|
|
use lemmy_api_common::context::LemmyContext;
|
|
|
|
use lemmy_utils::{error::LemmyError, ConnectionId};
|
|
|
|
|
|
|
|
mod list_comments;
|
|
|
|
mod list_posts;
|
|
|
|
mod read_community;
|
|
|
|
mod read_person;
|
|
|
|
mod resolve_object;
|
|
|
|
mod search;
|
|
|
|
|
2023-03-21 15:03:05 +00:00
|
|
|
#[async_trait::async_trait]
|
2022-11-28 14:29:33 +00:00
|
|
|
pub trait PerformApub {
|
|
|
|
type Response: serde::ser::Serialize + Send;
|
|
|
|
|
|
|
|
async fn perform(
|
|
|
|
&self,
|
|
|
|
context: &Data<LemmyContext>,
|
|
|
|
websocket_id: Option<ConnectionId>,
|
|
|
|
) -> Result<Self::Response, LemmyError>;
|
|
|
|
}
|