Fix cheat endpoint and jp client

This commit is contained in:
Ethan O'Brien
2026-02-10 14:35:19 -06:00
parent 8a666a56b5
commit 8e4300a7ea
2 changed files with 27 additions and 18 deletions

View File

@@ -349,7 +349,7 @@ pub fn cheat(req: HttpRequest, _body: String) -> HttpResponse {
return error("Not logged in");
}
let key = userdata::webui_login_token(&token.unwrap());
if key.is_some() {
if key.is_none() {
return error("Not logged in");
}
let key = key.unwrap();
@@ -375,5 +375,4 @@ pub fn cheat(req: HttpRequest, _body: String) -> HttpResponse {
//.insert_header(("Access-Control-Allow-Credentials", "true"))
.insert_header(ContentType::json())
.body(json::stringify(resp))
}