From: Nutomic Date: Fri, 4 Aug 2023 13:22:43 +0000 (+0200) Subject: Remove form_id params (#3812) X-Git-Url: http://these/git/%22%7Burl%7D/static/git-logo.png?a=commitdiff_plain;h=2bb24c2859a604f75ca5461b215e39e106614cc9;p=lemmy.git Remove form_id params (#3812) --- diff --git a/crates/api/src/comment/distinguish.rs b/crates/api/src/comment/distinguish.rs index 540c19a3..367ffcbf 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 13122b4b..af013f28 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 8c9d9055..f2c926f1 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 8d3bcda1..3140cd72 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 380e9f0c..1b0df39d 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 8b8afc8f..678bcfb0 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 10063c66..81a0116a 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 4ade60df..5f07f749 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 b2071298..b3afcc75 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 c7b82ba9..e170f2e0 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?,