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 {
|
||||
#[serde(skip_serializing, skip_deserializing)]
|
||||
pub id: i32,
|
||||
#[serde(rename = "userId")]
|
||||
pub user_id: i32,
|
||||
#[serde(skip_serializing, skip_deserializing)]
|
||||
pub time_created: Option<NaiveDateTime>,
|
||||
#[serde(skip_serializing, skip_deserializing)]
|
||||
pub last_updated: Option<NaiveDateTime>,
|
||||
#[serde(rename = "authToken")]
|
||||
pub auth_token: String,
|
||||
#[serde(rename = "refreshToken")]
|
||||
pub refresh_token: String
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user