Add dummy /api/login_bonus handler
This commit is contained in:
@ -22,3 +22,21 @@ pub fn dummy(req: HttpRequest, _body: String) -> HttpResponse {
|
||||
};
|
||||
global::send(resp)
|
||||
}
|
||||
|
||||
pub fn bonus(req: HttpRequest, _body: String) -> HttpResponse {
|
||||
//let body = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap();
|
||||
let blank_header = HeaderValue::from_static("");
|
||||
let key = req.headers().get("a6573cbe").unwrap_or(&blank_header).to_str().unwrap_or("");
|
||||
let user = userdata::get_acc_home(key);
|
||||
|
||||
let resp = object!{
|
||||
"code": 0,
|
||||
"server_time": global::timestamp(),
|
||||
"data": {
|
||||
"login_bonus_list": [],
|
||||
"start_time": global::timestamp(),
|
||||
"clear_mission_ids": user["clear_mission_ids"].clone()
|
||||
}
|
||||
};
|
||||
global::send(resp)
|
||||
}
|
||||
|
Reference in New Issue
Block a user