Serde renames for javascript appropriate camel case

This commit is contained in:
Imbus 2024-03-12 17:26:58 +01:00
parent 45c3b87243
commit 82e3f18961

View file

@ -28,7 +28,9 @@ pub struct PublicPost {
pub content: String,
pub upvotes: i64,
pub downvotes: i64,
#[serde(rename = "createdAt")]
pub created_at: chrono::NaiveDateTime,
#[serde(rename = "updatedAt")]
pub updated_at: chrono::NaiveDateTime,
}