-async fn route_get_apub<'a, Data>(
- data: web::Query<Data>,
- context: activitypub_federation::config::Data<LemmyContext>,
-) -> Result<HttpResponse, Error>
-where
- Data: PerformApub
- + SendActivity<Response = <Data as PerformApub>::Response>
- + Clone
- + Deserialize<'a>
- + Send
- + 'static,
-{
- let res = data.perform(&context).await?;
- SendActivity::send_activity(&data.0, &res, &context).await?;
- Ok(HttpResponse::Ok().json(res))
-}
-