mirror of
https://git.ethanthesleepy.one/ethanaobrien/ew.git
synced 2025-06-27 20:57:34 -05:00
Compare commits
No commits in common. "038a651202777f628ad5164d43098a43930cdac3" and "222021382fbe401469b5e2659c783478d852696f" have entirely different histories.
038a651202
...
222021382f
1 changed files with 1 additions and 4 deletions
|
@ -9,7 +9,6 @@ pub const FRIEND_LIMIT: usize = 40;
|
||||||
pub fn friend(req: HttpRequest, body: String) -> Option<JsonValue> {
|
pub fn friend(req: HttpRequest, body: String) -> Option<JsonValue> {
|
||||||
let key = global::get_login(req.headers(), &body);
|
let key = global::get_login(req.headers(), &body);
|
||||||
let body = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap();
|
let body = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap();
|
||||||
let user_id = userdata::get_acc(&key)["user"]["id"].as_i64().unwrap();
|
|
||||||
let friends = userdata::get_acc_friends(&key);
|
let friends = userdata::get_acc_friends(&key);
|
||||||
|
|
||||||
let mut rv = array![];
|
let mut rv = array![];
|
||||||
|
@ -25,9 +24,7 @@ pub fn friend(req: HttpRequest, body: String) -> Option<JsonValue> {
|
||||||
};
|
};
|
||||||
|
|
||||||
for uid in rv_data.members() {
|
for uid in rv_data.members() {
|
||||||
let mut user = global::get_user(uid.as_i64().unwrap(), &friends, false);
|
rv.push(global::get_user(uid.as_i64().unwrap(), &friends, false)).unwrap();
|
||||||
user["user"]["last_login_time"] = global::set_time(user["user"]["last_login_time"].as_u64().unwrap_or(0), user_id, false).into();
|
|
||||||
rv.push(user).unwrap();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Some(object!{
|
Some(object!{
|
||||||
|
|
Loading…
Add table
Reference in a new issue