todo: really fix UserLogoutApi
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
use std::time::{SystemTime, UNIX_EPOCH};
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Serialize)]
|
||||
@@ -13,7 +11,7 @@ pub struct UserLogoutApi {
|
||||
/// keychip without dash, 11 bytes
|
||||
pub client_id: String,
|
||||
/// Unix timestamp
|
||||
pub date_time: u64,
|
||||
pub login_date_time: u64,
|
||||
#[serde(rename = "type")]
|
||||
pub type_: i64,
|
||||
}
|
||||
@@ -27,19 +25,15 @@ pub struct UserLogoutApiResp {
|
||||
impl Default for UserLogoutApi {
|
||||
fn default() -> Self {
|
||||
let user_id = 0;
|
||||
let date_time = SystemTime::now()
|
||||
.duration_since(UNIX_EPOCH)
|
||||
.map(|t| t.as_secs())
|
||||
.unwrap_or_default();
|
||||
|
||||
Self {
|
||||
user_id,
|
||||
date_time,
|
||||
region_id: 22,
|
||||
place_id: 3490,
|
||||
client_id: "A63E01C2805".into(),
|
||||
type_: 1,
|
||||
access_code: "",
|
||||
|
||||
login_date_time: 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user