Added serde renaming to fields that need it in token
This commit is contained in:
parent
62c1937f11
commit
27fcb01ede
@ -8,12 +8,15 @@ pub const REFRESH_TOKEN_EXPIRATION_TIME_IN_DAYS: i32 = 20;
|
|||||||
pub struct Token {
|
pub struct Token {
|
||||||
#[serde(skip_serializing, skip_deserializing)]
|
#[serde(skip_serializing, skip_deserializing)]
|
||||||
pub id: i32,
|
pub id: i32,
|
||||||
|
#[serde(rename = "userId")]
|
||||||
pub user_id: i32,
|
pub user_id: i32,
|
||||||
#[serde(skip_serializing, skip_deserializing)]
|
#[serde(skip_serializing, skip_deserializing)]
|
||||||
pub time_created: Option<NaiveDateTime>,
|
pub time_created: Option<NaiveDateTime>,
|
||||||
#[serde(skip_serializing, skip_deserializing)]
|
#[serde(skip_serializing, skip_deserializing)]
|
||||||
pub last_updated: Option<NaiveDateTime>,
|
pub last_updated: Option<NaiveDateTime>,
|
||||||
|
#[serde(rename = "authToken")]
|
||||||
pub auth_token: String,
|
pub auth_token: String,
|
||||||
|
#[serde(rename = "refreshToken")]
|
||||||
pub refresh_token: String
|
pub refresh_token: String
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user