mirror of
https://git.ethanthesleepy.one/ethanaobrien/ew.git
synced 2025-05-13 11:37:33 -05:00
nvm its supposed to be like this
This commit is contained in:
parent
c55b24be16
commit
eb96e33a90
1 changed files with 3 additions and 15 deletions
|
@ -19,20 +19,6 @@ pub fn serial_code(req: HttpRequest, body: String) -> HttpResponse {
|
|||
let key = global::get_login(req.headers(), &body);
|
||||
let body = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap();
|
||||
let mut user = userdata::get_acc_home(&key);
|
||||
let mut data = userdata::get_server_data(&key);
|
||||
|
||||
if data["last_serial_code"].as_u64().unwrap_or(0) + 5 > global::timestamp() {
|
||||
let resp = object!{
|
||||
"code": 0,
|
||||
"server_time": global::timestamp(),
|
||||
"data": {
|
||||
"result_code": 3
|
||||
}
|
||||
};
|
||||
return global::send(resp, req);
|
||||
}
|
||||
data["last_serial_code"] = global::timestamp().into();
|
||||
userdata::save_server_data(&key, data);
|
||||
|
||||
let itemz;
|
||||
if body["input_code"].to_string() == "SIF2REVIVALREAL!" {
|
||||
|
@ -180,7 +166,9 @@ pub fn serial_code(req: HttpRequest, body: String) -> HttpResponse {
|
|||
return global::send(resp, req);
|
||||
}
|
||||
|
||||
if body["receive_flg"].as_i32().unwrap_or(0) != 1 {
|
||||
userdata::save_acc_home(&key, user.clone());
|
||||
}
|
||||
|
||||
let resp = object!{
|
||||
"code": 0,
|
||||
|
|
Loading…
Add table
Reference in a new issue