Send any friends your have as live guests

This commit is contained in:
Ethan O'Brien
2024-04-15 17:04:03 -05:00
parent d4ae8f7c5c
commit 60f8e96406
4 changed files with 85 additions and 12 deletions

View File

@ -365,12 +365,15 @@ pub fn migration(_req: HttpRequest, body: String) -> HttpResponse {
global::send(resp)
}
pub fn detail(_req: HttpRequest, body: String) -> HttpResponse {
pub fn detail(req: HttpRequest, body: String) -> HttpResponse {
let key = global::get_login(req.headers(), &body);
let body = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap();
let friends = userdata::get_acc_friends(&key);
let mut user_detail_list = array![];
for (_i, data) in body["user_ids"].members().enumerate() {
let uid = data.as_i64().unwrap();
let user = global::get_user(uid);
let user = global::get_user(uid, &friends);
user_detail_list.push(user).unwrap();
}
let resp = object!{