Merge pull request #354 from meilisearch/camelcase-updates-result

Fix updates formattings and namings
This commit is contained in:
Clément Renault 2019-11-29 15:19:45 +01:00 committed by GitHub
commit 7780293ddb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -172,6 +172,7 @@ pub enum UpdateType {
} }
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ProcessedUpdateResult { pub struct ProcessedUpdateResult {
pub update_id: u64, pub update_id: u64,
#[serde(rename = "type")] #[serde(rename = "type")]
@ -184,8 +185,10 @@ pub struct ProcessedUpdateResult {
} }
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct EnqueuedUpdateResult { pub struct EnqueuedUpdateResult {
pub update_id: u64, pub update_id: u64,
#[serde(rename = "type")]
pub update_type: UpdateType, pub update_type: UpdateType,
pub enqueued_at: DateTime<Utc>, pub enqueued_at: DateTime<Utc>,
} }