mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-12 15:34:00 +00:00
Remove form_id params (#3812)
This commit is contained in:
parent
da031a4ce2
commit
2bb24c2859
10 changed files with 1 additions and 15 deletions
|
@ -52,6 +52,5 @@ pub async fn distinguish_comment(
|
||||||
Ok(Json(CommentResponse {
|
Ok(Json(CommentResponse {
|
||||||
comment_view,
|
comment_view,
|
||||||
recipient_ids: Vec::new(),
|
recipient_ids: Vec::new(),
|
||||||
form_id: None,
|
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,6 @@ pub async fn like_comment(
|
||||||
context.deref(),
|
context.deref(),
|
||||||
comment_id,
|
comment_id,
|
||||||
Some(local_user_view),
|
Some(local_user_view),
|
||||||
None,
|
|
||||||
recipient_ids,
|
recipient_ids,
|
||||||
)
|
)
|
||||||
.await?,
|
.await?,
|
||||||
|
|
|
@ -40,6 +40,5 @@ pub async fn save_comment(
|
||||||
Ok(Json(CommentResponse {
|
Ok(Json(CommentResponse {
|
||||||
comment_view,
|
comment_view,
|
||||||
recipient_ids: Vec::new(),
|
recipient_ids: Vec::new(),
|
||||||
form_id: None,
|
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,6 @@ pub async fn build_comment_response(
|
||||||
context: &LemmyContext,
|
context: &LemmyContext,
|
||||||
comment_id: CommentId,
|
comment_id: CommentId,
|
||||||
local_user_view: Option<LocalUserView>,
|
local_user_view: Option<LocalUserView>,
|
||||||
form_id: Option<String>,
|
|
||||||
recipient_ids: Vec<LocalUserId>,
|
recipient_ids: Vec<LocalUserId>,
|
||||||
) -> Result<CommentResponse, LemmyError> {
|
) -> Result<CommentResponse, LemmyError> {
|
||||||
let person_id = local_user_view.map(|l| l.person.id);
|
let person_id = local_user_view.map(|l| l.person.id);
|
||||||
|
@ -34,7 +33,6 @@ pub async fn build_comment_response(
|
||||||
Ok(CommentResponse {
|
Ok(CommentResponse {
|
||||||
comment_view,
|
comment_view,
|
||||||
recipient_ids,
|
recipient_ids,
|
||||||
form_id,
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,6 @@ pub struct CreateComment {
|
||||||
pub post_id: PostId,
|
pub post_id: PostId,
|
||||||
pub parent_id: Option<CommentId>,
|
pub parent_id: Option<CommentId>,
|
||||||
pub language_id: Option<LanguageId>,
|
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>,
|
pub auth: Sensitive<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,7 +42,6 @@ pub struct EditComment {
|
||||||
pub comment_id: CommentId,
|
pub comment_id: CommentId,
|
||||||
pub content: Option<String>,
|
pub content: Option<String>,
|
||||||
pub language_id: Option<LanguageId>,
|
pub language_id: Option<LanguageId>,
|
||||||
pub form_id: Option<String>,
|
|
||||||
pub auth: Sensitive<String>,
|
pub auth: Sensitive<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,8 +97,6 @@ pub struct SaveComment {
|
||||||
pub struct CommentResponse {
|
pub struct CommentResponse {
|
||||||
pub comment_view: CommentView,
|
pub comment_view: CommentView,
|
||||||
pub recipient_ids: Vec<LocalUserId>,
|
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)]
|
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
|
||||||
|
|
|
@ -198,7 +198,6 @@ pub async fn create_comment(
|
||||||
&context,
|
&context,
|
||||||
inserted_comment.id,
|
inserted_comment.id,
|
||||||
Some(local_user_view),
|
Some(local_user_view),
|
||||||
data.form_id.clone(),
|
|
||||||
recipient_ids,
|
recipient_ids,
|
||||||
)
|
)
|
||||||
.await?,
|
.await?,
|
||||||
|
|
|
@ -82,7 +82,6 @@ pub async fn delete_comment(
|
||||||
&context,
|
&context,
|
||||||
updated_comment_id,
|
updated_comment_id,
|
||||||
Some(local_user_view),
|
Some(local_user_view),
|
||||||
None,
|
|
||||||
recipient_ids,
|
recipient_ids,
|
||||||
)
|
)
|
||||||
.await?,
|
.await?,
|
||||||
|
|
|
@ -19,6 +19,6 @@ pub async fn get_comment(
|
||||||
check_private_instance(&local_user_view, &local_site)?;
|
check_private_instance(&local_user_view, &local_site)?;
|
||||||
|
|
||||||
Ok(Json(
|
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?,
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,7 +91,6 @@ pub async fn remove_comment(
|
||||||
&context,
|
&context,
|
||||||
updated_comment_id,
|
updated_comment_id,
|
||||||
Some(local_user_view),
|
Some(local_user_view),
|
||||||
None,
|
|
||||||
recipient_ids,
|
recipient_ids,
|
||||||
)
|
)
|
||||||
.await?,
|
.await?,
|
||||||
|
|
|
@ -104,7 +104,6 @@ pub async fn update_comment(
|
||||||
&context,
|
&context,
|
||||||
updated_comment.id,
|
updated_comment.id,
|
||||||
Some(local_user_view),
|
Some(local_user_view),
|
||||||
data.form_id.clone(),
|
|
||||||
recipient_ids,
|
recipient_ids,
|
||||||
)
|
)
|
||||||
.await?,
|
.await?,
|
||||||
|
|
Loading…
Reference in a new issue