From 2de5a4968b283b04738e52bfd97b6410405bce4c Mon Sep 17 00:00:00 2001 From: phiresky Date: Fri, 13 Dec 2024 14:07:46 +0100 Subject: [PATCH] add ts-rs optionals --- crates/api_common/src/post.rs | 2 ++ crates/db_schema/src/source/tag.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/crates/api_common/src/post.rs b/crates/api_common/src/post.rs index 44e98424f..fb16c8aa8 100644 --- a/crates/api_common/src/post.rs +++ b/crates/api_common/src/post.rs @@ -37,6 +37,7 @@ pub struct CreatePost { /// Instead of fetching a thumbnail, use a custom one. #[cfg_attr(feature = "full", ts(optional))] pub custom_thumbnail: Option, + #[cfg_attr(feature = "full", ts(optional))] pub tags: Option>, /// Time when this post should be scheduled. Null means publish immediately. #[cfg_attr(feature = "full", ts(optional))] @@ -165,6 +166,7 @@ pub struct EditPost { /// Instead of fetching a thumbnail, use a custom one. #[cfg_attr(feature = "full", ts(optional))] pub custom_thumbnail: Option, + #[cfg_attr(feature = "full", ts(optional))] pub tags: Option>, /// Time when this post should be scheduled. Null means publish immediately. #[cfg_attr(feature = "full", ts(optional))] diff --git a/crates/db_schema/src/source/tag.rs b/crates/db_schema/src/source/tag.rs index 33b2fd087..265d864c3 100644 --- a/crates/db_schema/src/source/tag.rs +++ b/crates/db_schema/src/source/tag.rs @@ -30,6 +30,7 @@ pub struct Tag { /// the community that owns this tag pub community_id: CommunityId, pub published: DateTime, + #[cfg_attr(feature = "full", ts(optional))] pub updated: Option>, pub deleted: bool, }