Remove form_id params (#3812)

This commit is contained in:
Nutomic 2023-08-04 15:22:43 +02:00 committed by GitHub
parent da031a4ce2
commit 2bb24c2859
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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?,