diff --git a/crates/apub/src/api/list_comments.rs b/crates/apub/src/api/list_comments.rs index c7f011ca9..487aefa9e 100644 --- a/crates/apub/src/api/list_comments.rs +++ b/crates/apub/src/api/list_comments.rs @@ -4,7 +4,7 @@ use crate::{ objects::community::ApubCommunity, }; use activitypub_federation::config::Data; -use actix_web::web::Json; +use actix_web::web::{Json, Query}; use lemmy_api_common::{ comment::{GetComments, GetCommentsResponse}, context::LemmyContext, @@ -19,7 +19,7 @@ use lemmy_utils::error::LemmyError; #[tracing::instrument(skip(context))] pub async fn list_comments( - data: Json, + data: Query, context: Data, ) -> Result, LemmyError> { let local_user_view = local_user_view_from_jwt_opt(data.auth.as_ref(), &context).await; diff --git a/crates/apub/src/api/list_posts.rs b/crates/apub/src/api/list_posts.rs index dca5b5afd..bde373f65 100644 --- a/crates/apub/src/api/list_posts.rs +++ b/crates/apub/src/api/list_posts.rs @@ -4,7 +4,7 @@ use crate::{ objects::community::ApubCommunity, }; use activitypub_federation::config::Data; -use actix_web::web::Json; +use actix_web::web::{Json, Query}; use lemmy_api_common::{ context::LemmyContext, post::{GetPosts, GetPostsResponse}, @@ -16,7 +16,7 @@ use lemmy_utils::error::LemmyError; #[tracing::instrument(skip(context))] pub async fn list_posts( - data: Json, + data: Query, context: Data, ) -> Result, LemmyError> { let local_user_view = local_user_view_from_jwt_opt(data.auth.as_ref(), &context).await; diff --git a/crates/apub/src/api/read_community.rs b/crates/apub/src/api/read_community.rs index 70578c6a5..e524694d3 100644 --- a/crates/apub/src/api/read_community.rs +++ b/crates/apub/src/api/read_community.rs @@ -1,6 +1,6 @@ use crate::{fetcher::resolve_actor_identifier, objects::community::ApubCommunity}; use activitypub_federation::config::Data; -use actix_web::web::Json; +use actix_web::web::{Json, Query}; use lemmy_api_common::{ community::{GetCommunity, GetCommunityResponse}, context::LemmyContext, @@ -17,7 +17,7 @@ use lemmy_utils::error::LemmyError; #[tracing::instrument(skip(context))] pub async fn read_community( - data: Json, + data: Query, context: Data, ) -> Result, LemmyError> { let local_user_view = local_user_view_from_jwt_opt(data.auth.as_ref(), &context).await; diff --git a/crates/apub/src/api/read_person.rs b/crates/apub/src/api/read_person.rs index cf034e867..fb4755e38 100644 --- a/crates/apub/src/api/read_person.rs +++ b/crates/apub/src/api/read_person.rs @@ -1,6 +1,6 @@ use crate::{fetcher::resolve_actor_identifier, objects::person::ApubPerson}; use activitypub_federation::config::Data; -use actix_web::web::Json; +use actix_web::web::{Json, Query}; use lemmy_api_common::{ context::LemmyContext, person::{GetPersonDetails, GetPersonDetailsResponse}, @@ -16,7 +16,7 @@ use lemmy_utils::error::LemmyError; #[tracing::instrument(skip(context))] pub async fn read_person( - data: Json, + data: Query, context: Data, ) -> Result, LemmyError> { // Check to make sure a person name or an id is given diff --git a/crates/apub/src/api/resolve_object.rs b/crates/apub/src/api/resolve_object.rs index 4104c13bb..09689def1 100644 --- a/crates/apub/src/api/resolve_object.rs +++ b/crates/apub/src/api/resolve_object.rs @@ -1,6 +1,6 @@ use crate::fetcher::search::{search_query_to_object_id, SearchableObjects}; use activitypub_federation::config::Data; -use actix_web::web::Json; +use actix_web::web::{Json, Query}; use diesel::NotFound; use lemmy_api_common::{ context::LemmyContext, @@ -14,7 +14,7 @@ use lemmy_utils::error::LemmyError; #[tracing::instrument(skip(context))] pub async fn resolve_object( - data: Json, + data: Query, context: Data, ) -> Result, LemmyError> { let local_user_view = local_user_view_from_jwt(&data.auth, &context).await?; diff --git a/crates/apub/src/api/search.rs b/crates/apub/src/api/search.rs index b207be29b..777a7013b 100644 --- a/crates/apub/src/api/search.rs +++ b/crates/apub/src/api/search.rs @@ -1,6 +1,6 @@ use crate::{fetcher::resolve_actor_identifier, objects::community::ApubCommunity}; use activitypub_federation::config::Data; -use actix_web::web::Json; +use actix_web::web::{Json, Query}; use lemmy_api_common::{ context::LemmyContext, site::{Search, SearchResponse}, @@ -17,7 +17,7 @@ use lemmy_utils::error::LemmyError; #[tracing::instrument(skip(context))] pub async fn search( - data: Json, + data: Query, context: Data, ) -> Result, LemmyError> { let local_user_view = local_user_view_from_jwt_opt(data.auth.as_ref(), &context).await;