Implement proper jp authentication (gree)

This commit is contained in:
Ethan O'Brien
2024-04-08 11:55:04 -05:00
parent f33e211dab
commit b5138bfaaa
13 changed files with 381 additions and 42 deletions

View File

@@ -5,8 +5,8 @@ use crate::router::global;
use actix_web::{HttpResponse, HttpRequest};
use crate::router::userdata;
pub fn home(req: HttpRequest, _body: String) -> HttpResponse {
let key = global::get_login(req.headers());
pub fn home(req: HttpRequest, body: String) -> HttpResponse {
let key = global::get_login(req.headers(), &body);
let user = userdata::get_acc(&key);
let id = user["user"]["favorite_master_card_id"].as_i64().unwrap() / 10000;