Modify auth to work with jp

Though idk if it works long term yet
This commit is contained in:
Ethan O'Brien
2024-03-28 11:11:19 -05:00
parent f256c9a1f7
commit 94f84930c2
11 changed files with 53 additions and 64 deletions

View File

@ -1,13 +1,12 @@
use json;
use json::object;
use crate::router::global;
use actix_web::{HttpResponse, HttpRequest, http::header::HeaderValue};
use actix_web::{HttpResponse, HttpRequest};
use crate::router::userdata;
pub fn mission(req: HttpRequest) -> HttpResponse {
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(key);
let key = global::get_login(req.headers());
let user = userdata::get_acc(&key);
let resp = object!{
"code": 0,