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