Mark some *Action struct fields as serde(skip) (ref #5532) (#5739)

This commit is contained in:
Nutomic 2025-06-04 07:58:24 +00:00 committed by GitHub
parent 9f425b8f42
commit 64ed2a3cd2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 11 additions and 1 deletions

View file

@ -139,7 +139,9 @@ pub struct CommentUpdateForm {
#[cfg_attr(feature = "full", ts(export))]
#[cfg_attr(feature = "full", cursor_keys_module(name = comment_actions_keys))]
pub struct CommentActions {
#[serde(skip)]
pub person_id: PersonId,
#[serde(skip)]
pub comment_id: CommentId,
#[cfg_attr(feature = "full", ts(optional))]
/// The like / score for the comment.

View file

@ -202,7 +202,9 @@ pub struct CommunityUpdateForm {
#[cfg_attr(feature = "full", ts(export))]
#[cfg_attr(feature = "full", cursor_keys_module(name = community_actions_keys))]
pub struct CommunityActions {
#[serde(skip)]
pub community_id: CommunityId,
#[serde(skip)]
pub person_id: PersonId,
#[cfg_attr(feature = "full", ts(optional))]
/// When the community was followed.
@ -210,8 +212,8 @@ pub struct CommunityActions {
#[cfg_attr(feature = "full", ts(optional))]
/// The state of the community follow.
pub follow_state: Option<CommunityFollowerState>,
#[cfg_attr(feature = "full", ts(optional))]
/// The approver of the community follow.
#[serde(skip)]
pub follow_approver_id: Option<PersonId>,
#[cfg_attr(feature = "full", ts(optional))]
/// When the community was blocked.

View file

@ -58,7 +58,9 @@ pub struct InstanceForm {
#[cfg_attr(feature = "full", diesel(check_for_backend(diesel::pg::Pg)))]
#[cfg_attr(feature = "full", ts(export))]
pub struct InstanceActions {
#[serde(skip)]
pub person_id: PersonId,
#[serde(skip)]
pub instance_id: InstanceId,
#[cfg_attr(feature = "full", ts(optional))]
/// When the instance was blocked.

View file

@ -140,7 +140,9 @@ pub struct PersonUpdateForm {
#[cfg_attr(feature = "full", diesel(check_for_backend(diesel::pg::Pg)))]
#[cfg_attr(feature = "full", ts(export))]
pub struct PersonActions {
#[serde(skip)]
pub target_id: PersonId,
#[serde(skip)]
pub person_id: PersonId,
#[serde(skip)]
pub followed: Option<DateTime<Utc>>,

View file

@ -198,7 +198,9 @@ pub struct PostUpdateForm {
#[cfg_attr(feature = "full", ts(export))]
#[cfg_attr(feature = "full", cursor_keys_module(name = post_actions_keys))]
pub struct PostActions {
#[serde(skip)]
pub post_id: PostId,
#[serde(skip)]
pub person_id: PersonId,
#[cfg_attr(feature = "full", ts(optional))]
/// When the post was read.