Remove form_id params

This commit is contained in:
Felix Ableitner 2023-08-03 22:12:46 +02:00
parent da031a4ce2
commit 94d8663ab5
10 changed files with 1 additions and 15 deletions

View file

@ -52,6 +52,5 @@ pub async fn distinguish_comment(
Ok(Json(CommentResponse {
comment_view,
recipient_ids: Vec::new(),
form_id: None,
}))
}

View file

@ -89,7 +89,6 @@ pub async fn like_comment(
context.deref(),
comment_id,
Some(local_user_view),
None,
recipient_ids,
)
.await?,

View file

@ -40,6 +40,5 @@ pub async fn save_comment(
Ok(Json(CommentResponse {
comment_view,
recipient_ids: Vec::new(),
form_id: None,
}))
}

View 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,
})
}

View 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)]

View 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?,

View file

@ -82,7 +82,6 @@ pub async fn delete_comment(
&context,
updated_comment_id,
Some(local_user_view),
None,
recipient_ids,
)
.await?,

View 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?,
))
}

View file

@ -91,7 +91,6 @@ pub async fn remove_comment(
&context,
updated_comment_id,
Some(local_user_view),
None,
recipient_ids,
)
.await?,

View 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?,