From 2bb24c2859a604f75ca5461b215e39e106614cc9 Mon Sep 17 00:00:00 2001 From: Nutomic Date: Fri, 4 Aug 2023 15:22:43 +0200 Subject: [PATCH] Remove form_id params (#3812) --- crates/api/src/comment/distinguish.rs | 1 - crates/api/src/comment/like.rs | 1 - crates/api/src/comment/save.rs | 1 - crates/api_common/src/build_response.rs | 2 -- crates/api_common/src/comment.rs | 5 ----- crates/api_crud/src/comment/create.rs | 1 - crates/api_crud/src/comment/delete.rs | 1 - crates/api_crud/src/comment/read.rs | 2 +- crates/api_crud/src/comment/remove.rs | 1 - crates/api_crud/src/comment/update.rs | 1 - 10 files changed, 1 insertion(+), 15 deletions(-) diff --git a/crates/api/src/comment/distinguish.rs b/crates/api/src/comment/distinguish.rs index 540c19a3d..367ffcbf7 100644 --- a/crates/api/src/comment/distinguish.rs +++ b/crates/api/src/comment/distinguish.rs @@ -52,6 +52,5 @@ pub async fn distinguish_comment( Ok(Json(CommentResponse { comment_view, recipient_ids: Vec::new(), - form_id: None, })) } diff --git a/crates/api/src/comment/like.rs b/crates/api/src/comment/like.rs index 13122b4be..af013f283 100644 --- a/crates/api/src/comment/like.rs +++ b/crates/api/src/comment/like.rs @@ -89,7 +89,6 @@ pub async fn like_comment( context.deref(), comment_id, Some(local_user_view), - None, recipient_ids, ) .await?, diff --git a/crates/api/src/comment/save.rs b/crates/api/src/comment/save.rs index 8c9d90555..f2c926f17 100644 --- a/crates/api/src/comment/save.rs +++ b/crates/api/src/comment/save.rs @@ -40,6 +40,5 @@ pub async fn save_comment( Ok(Json(CommentResponse { comment_view, recipient_ids: Vec::new(), - form_id: None, })) } diff --git a/crates/api_common/src/build_response.rs b/crates/api_common/src/build_response.rs index 8d3bcda1a..3140cd722 100644 --- a/crates/api_common/src/build_response.rs +++ b/crates/api_common/src/build_response.rs @@ -26,7 +26,6 @@ pub async fn build_comment_response( context: &LemmyContext, comment_id: CommentId, local_user_view: Option, - form_id: Option, recipient_ids: Vec, ) -> Result { let person_id = local_user_view.map(|l| l.person.id); @@ -34,7 +33,6 @@ pub async fn build_comment_response( Ok(CommentResponse { comment_view, recipient_ids, - form_id, }) } diff --git a/crates/api_common/src/comment.rs b/crates/api_common/src/comment.rs index 380e9f0ca..1b0df39d2 100644 --- a/crates/api_common/src/comment.rs +++ b/crates/api_common/src/comment.rs @@ -20,8 +20,6 @@ pub struct CreateComment { pub post_id: PostId, pub parent_id: Option, pub language_id: Option, - /// An optional front-end ID, to help UIs determine where the comment should go. - pub form_id: Option, pub auth: Sensitive, } @@ -44,7 +42,6 @@ pub struct EditComment { pub comment_id: CommentId, pub content: Option, pub language_id: Option, - pub form_id: Option, pub auth: Sensitive, } @@ -100,8 +97,6 @@ pub struct SaveComment { pub struct CommentResponse { pub comment_view: CommentView, pub recipient_ids: Vec, - /// An optional front end ID, to tell which is coming back - pub form_id: Option, } #[derive(Debug, Serialize, Deserialize, Clone, Default)] diff --git a/crates/api_crud/src/comment/create.rs b/crates/api_crud/src/comment/create.rs index 8b8afc8f1..678bcfb08 100644 --- a/crates/api_crud/src/comment/create.rs +++ b/crates/api_crud/src/comment/create.rs @@ -198,7 +198,6 @@ pub async fn create_comment( &context, inserted_comment.id, Some(local_user_view), - data.form_id.clone(), recipient_ids, ) .await?, diff --git a/crates/api_crud/src/comment/delete.rs b/crates/api_crud/src/comment/delete.rs index 10063c66f..81a0116a6 100644 --- a/crates/api_crud/src/comment/delete.rs +++ b/crates/api_crud/src/comment/delete.rs @@ -82,7 +82,6 @@ pub async fn delete_comment( &context, updated_comment_id, Some(local_user_view), - None, recipient_ids, ) .await?, diff --git a/crates/api_crud/src/comment/read.rs b/crates/api_crud/src/comment/read.rs index 4ade60df5..5f07f7496 100644 --- a/crates/api_crud/src/comment/read.rs +++ b/crates/api_crud/src/comment/read.rs @@ -19,6 +19,6 @@ pub async fn get_comment( check_private_instance(&local_user_view, &local_site)?; Ok(Json( - build_comment_response(&context, data.id, local_user_view, None, vec![]).await?, + build_comment_response(&context, data.id, local_user_view, vec![]).await?, )) } diff --git a/crates/api_crud/src/comment/remove.rs b/crates/api_crud/src/comment/remove.rs index b20712986..b3afcc755 100644 --- a/crates/api_crud/src/comment/remove.rs +++ b/crates/api_crud/src/comment/remove.rs @@ -91,7 +91,6 @@ pub async fn remove_comment( &context, updated_comment_id, Some(local_user_view), - None, recipient_ids, ) .await?, diff --git a/crates/api_crud/src/comment/update.rs b/crates/api_crud/src/comment/update.rs index c7b82ba97..e170f2e05 100644 --- a/crates/api_crud/src/comment/update.rs +++ b/crates/api_crud/src/comment/update.rs @@ -104,7 +104,6 @@ pub async fn update_comment( &context, updated_comment.id, Some(local_user_view), - data.form_id.clone(), recipient_ids, ) .await?,