Serde renames for javascript appropriate camel case
This commit is contained in:
parent
45c3b87243
commit
82e3f18961
1 changed files with 2 additions and 0 deletions
|
@ -28,7 +28,9 @@ pub struct PublicPost {
|
||||||
pub content: String,
|
pub content: String,
|
||||||
pub upvotes: i64,
|
pub upvotes: i64,
|
||||||
pub downvotes: i64,
|
pub downvotes: i64,
|
||||||
|
#[serde(rename = "createdAt")]
|
||||||
pub created_at: chrono::NaiveDateTime,
|
pub created_at: chrono::NaiveDateTime,
|
||||||
|
#[serde(rename = "updatedAt")]
|
||||||
pub updated_at: chrono::NaiveDateTime,
|
pub updated_at: chrono::NaiveDateTime,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue