ソースを参照

Update created_at to return a timestamp.

Lee Morgan 1 年間 前
コミット
277ad5ced0
2 ファイル変更2 行追加2 行削除
  1. 1 1
      src/controllers/user.rs
  2. 1 1
      src/dto/user.rs

+ 1 - 1
src/controllers/user.rs

@@ -69,6 +69,6 @@ fn response_user(user: User) -> dto::user::ResponseUser {
     dto::user::ResponseUser {
         id: user._id.unwrap().to_string(),
         email: user.email,
-        created_at: user.created_at.to_string()
+        created_at: user.created_at.timestamp_millis()
     }
 }

+ 1 - 1
src/dto/user.rs

@@ -11,5 +11,5 @@ pub struct Login {
 pub struct ResponseUser {
     pub id: String,
     pub email: String,
-    pub created_at: String
+    pub created_at: i64
 }