]> Untitled Git - lemmy.git/commitdiff
Remove form_id params (#3812)
authorNutomic <me@nutomic.com>
Fri, 4 Aug 2023 13:22:43 +0000 (15:22 +0200)
committerGitHub <noreply@github.com>
Fri, 4 Aug 2023 13:22:43 +0000 (09:22 -0400)
crates/api/src/comment/distinguish.rs
crates/api/src/comment/like.rs
crates/api/src/comment/save.rs
crates/api_common/src/build_response.rs
crates/api_common/src/comment.rs
crates/api_crud/src/comment/create.rs
crates/api_crud/src/comment/delete.rs
crates/api_crud/src/comment/read.rs
crates/api_crud/src/comment/remove.rs
crates/api_crud/src/comment/update.rs

index 540c19a3dd3af8519df18b45bd48b44704b47bc5..367ffcbf7c5af69bcb91794e320c715f95ede71c 100644 (file)
@@ -52,6 +52,5 @@ pub async fn distinguish_comment(
   Ok(Json(CommentResponse {
     comment_view,
     recipient_ids: Vec::new(),
-    form_id: None,
   }))
 }
index 13122b4be0823d943e9dbcf981f321906131c032..af013f2831a60c1e7c843b8c4cafe773057176c8 100644 (file)
@@ -89,7 +89,6 @@ pub async fn like_comment(
       context.deref(),
       comment_id,
       Some(local_user_view),
-      None,
       recipient_ids,
     )
     .await?,
index 8c9d90555cdad424b9c8a5d470ba5e8af0882672..f2c926f17a60aa0dfaf01a4bb553cd3d3820265c 100644 (file)
@@ -40,6 +40,5 @@ pub async fn save_comment(
   Ok(Json(CommentResponse {
     comment_view,
     recipient_ids: Vec::new(),
-    form_id: None,
   }))
 }
index 8d3bcda1ae9c296fa6f2d725452b80ca43621a2f..3140cd72225c572d1105702d8d973941a3da6ba7 100644 (file)
@@ -26,7 +26,6 @@ pub async fn build_comment_response(
   context: &LemmyContext,
   comment_id: CommentId,
   local_user_view: Option<LocalUserView>,
-  form_id: Option<String>,
   recipient_ids: Vec<LocalUserId>,
 ) -> Result<CommentResponse, LemmyError> {
   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,
   })
 }
 
index 380e9f0caf76299f0f6d39c83d136ce65fa93299..1b0df39d20decc23377183d85f0f324b8e3259ce 100644 (file)
@@ -20,8 +20,6 @@ pub struct CreateComment {
   pub post_id: PostId,
   pub parent_id: Option<CommentId>,
   pub language_id: Option<LanguageId>,
-  /// An optional front-end ID, to help UIs determine where the comment should go.
-  pub form_id: Option<String>,
   pub auth: Sensitive<String>,
 }
 
@@ -44,7 +42,6 @@ pub struct EditComment {
   pub comment_id: CommentId,
   pub content: Option<String>,
   pub language_id: Option<LanguageId>,
-  pub form_id: Option<String>,
   pub auth: Sensitive<String>,
 }
 
@@ -100,8 +97,6 @@ pub struct SaveComment {
 pub struct CommentResponse {
   pub comment_view: CommentView,
   pub recipient_ids: Vec<LocalUserId>,
-  /// An optional front end ID, to tell which is coming back  
-  pub form_id: Option<String>,
 }
 
 #[derive(Debug, Serialize, Deserialize, Clone, Default)]
index 8b8afc8f1267fc2c1634e3daf6bab7aafd1ed84a..678bcfb08ab8f22c0fed39fe55517e8760224f0c 100644 (file)
@@ -198,7 +198,6 @@ pub async fn create_comment(
       &context,
       inserted_comment.id,
       Some(local_user_view),
-      data.form_id.clone(),
       recipient_ids,
     )
     .await?,
index 10063c66fb3e33dd60b2bbf49c9c36c70a7c638e..81a0116a67368fc2c758f093bdc0018453caf699 100644 (file)
@@ -82,7 +82,6 @@ pub async fn delete_comment(
       &context,
       updated_comment_id,
       Some(local_user_view),
-      None,
       recipient_ids,
     )
     .await?,
index 4ade60df55967571c04758c1446c47cce3841f50..5f07f74961e97165dd1a0fd61bce0325db709161 100644 (file)
@@ -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?,
   ))
 }
index b2071298656f6074f07223d6c0c68c57337ab626..b3afcc7553907fd22d8604162ecd9ad488d9b419 100644 (file)
@@ -91,7 +91,6 @@ pub async fn remove_comment(
       &context,
       updated_comment_id,
       Some(local_user_view),
-      None,
       recipient_ids,
     )
     .await?,
index c7b82ba9710a3a364008fbfff0e522e53e68a667..e170f2e0559efbe8a63cfc01094d859d545b6f06 100644 (file)
@@ -104,7 +104,6 @@ pub async fn update_comment(
       &context,
       updated_comment.id,
       Some(local_user_view),
-      data.form_id.clone(),
       recipient_ids,
     )
     .await?,