Fixing a few optionals. (#5782)

* Fixing a few optionals.

* Fixing note.
This commit is contained in:
Dessalines 2025-06-12 13:19:06 -04:00 committed by GitHub
parent a2ef488528
commit ba0099e7a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 2 additions and 5 deletions

View File

@ -144,10 +144,8 @@ pub struct PersonActions {
pub follow_pending: Option<bool>,
/// When the person was blocked.
pub blocked_at: Option<DateTime<Utc>>,
#[cfg_attr(feature = "full", ts(optional))]
/// When the person was noted.
pub noted_at: Option<DateTime<Utc>>,
#[cfg_attr(feature = "full", ts(optional))]
/// A note about the person.
pub note: Option<String>,
}

View File

@ -164,8 +164,8 @@ pub struct LoginResponse {
}
#[derive(Debug, Serialize, Deserialize, Clone, Default, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "full", derive(TS))]
#[cfg_attr(feature = "full", ts(export))]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(optional_fields, export))]
/// Make a note for a person.
///
/// An empty string deletes the note.

View File

@ -42,7 +42,6 @@ pub struct PersonView {
)]
pub is_admin: bool,
#[cfg_attr(feature = "full", diesel(embed))]
#[cfg_attr(feature = "full", ts(optional))]
pub person_actions: Option<PersonActions>,
#[cfg_attr(feature = "full", diesel(
select_expression_type = Nullable<CreatorHomeInstanceActionsAllColumnsTuple>,