Added skipping deserialization to fields in token that are skipping being serialized to avoid parsing errors
This commit is contained in:
parent
3633ee5254
commit
8e49e7e7f1
@ -6,12 +6,12 @@ pub const REFRESH_TOKEN_EXPIRATION_TIME_IN_DAYS: i32 = 20;
|
|||||||
|
|
||||||
#[derive(Serialize, Deserialize)]
|
#[derive(Serialize, Deserialize)]
|
||||||
pub struct Token {
|
pub struct Token {
|
||||||
#[serde(skip_serializing)]
|
#[serde(skip_serializing, skip_deserializing)]
|
||||||
pub id: i32,
|
pub id: i32,
|
||||||
pub user_id: i32,
|
pub user_id: i32,
|
||||||
#[serde(skip_serializing)]
|
#[serde(skip_serializing, skip_deserializing)]
|
||||||
pub time_created: Option<NaiveDateTime>,
|
pub time_created: Option<NaiveDateTime>,
|
||||||
#[serde(skip_serializing)]
|
#[serde(skip_serializing, skip_deserializing)]
|
||||||
pub last_updated: Option<NaiveDateTime>,
|
pub last_updated: Option<NaiveDateTime>,
|
||||||
pub auth_token: String,
|
pub auth_token: String,
|
||||||
pub refresh_token: String
|
pub refresh_token: String
|
||||||
|
Loading…
Reference in New Issue
Block a user