use empty_string_as_none in User struct deserialization
+use crate::types::empty_string_as_none;
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
@@ -16,7 +17,9 @@ pub struct User {
#[serde(rename = "_id")]
pub id: String,
pub email: String,
+ #[serde(deserialize_with = "empty_string_as_none")]
pub fb_id: Option<String>,
+ #[serde(deserialize_with = "empty_string_as_none")]
pub avatar: Option<String>,
pub last_modified: DateTime<Utc>,
pub date_registered: DateTime<Utc>,
