From 27fcb01ede4d52412e5d99d1a07d45bcc6f92011 Mon Sep 17 00:00:00 2001 From: Franklin Date: Sat, 27 Aug 2022 11:42:43 -0400 Subject: [PATCH] Added serde renaming to fields that need it in token --- src/domain/user/token.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/domain/user/token.rs b/src/domain/user/token.rs index b7aac8f..a4d4fc5 100644 --- a/src/domain/user/token.rs +++ b/src/domain/user/token.rs @@ -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, #[serde(skip_serializing, skip_deserializing)] pub last_updated: Option, + #[serde(rename = "authToken")] pub auth_token: String, + #[serde(rename = "refreshToken")] pub refresh_token: String }