diff --git a/src/post.rs b/src/post.rs index 9b801b5..37ed09f 100644 --- a/src/post.rs +++ b/src/post.rs @@ -2,7 +2,7 @@ pub type Id = u64; pub type FileSize = u64; pub type ImageDimension = u64; -#[derive(serde::Deserialize, Clone, Debug)] +#[derive(serde::Serialize, serde::Deserialize, Clone, Debug)] pub struct Posts { #[serde(alias = "posts")] inner: Vec @@ -15,7 +15,7 @@ impl Into> for Posts { } -#[derive(serde::Deserialize, Clone, Debug)] +#[derive(serde::Serialize, serde::Deserialize, Clone, Debug)] pub struct Post { pub id: Id, pub created_at: String, @@ -35,7 +35,7 @@ pub struct Post { pub relationships: PostRelationships } -#[derive(serde::Deserialize, Clone, Debug)] +#[derive(serde::Serialize, serde::Deserialize, Clone, Debug)] pub struct PostTags { pub general: Vec, pub artist: Vec, @@ -46,7 +46,7 @@ pub struct PostTags { pub lore: Vec } -#[derive(serde::Deserialize, Clone, Debug)] +#[derive(serde::Serialize, serde::Deserialize, Clone, Debug)] pub struct PostFile { pub width: ImageDimension, pub height: ImageDimension, @@ -56,7 +56,7 @@ pub struct PostFile { pub url: String } -#[derive(serde::Deserialize, Clone, Debug)] +#[derive(serde::Serialize, serde::Deserialize, Clone, Debug)] pub struct PostRelationships { pub parent_id: Option, pub has_children: bool,