Add endpoint to cheat

This commit is contained in:
Ethan O'Brien
2026-02-06 14:39:49 -06:00
parent f4fcbf30ed
commit 8a666a56b5
5 changed files with 251 additions and 215 deletions

View File

@@ -454,7 +454,7 @@ pub fn webui_import_user(user: JsonValue) -> Result<JsonValue, String> {
})
}
fn webui_login_token(token: &str) -> Option<String> {
pub fn webui_login_token(token: &str) -> Option<String> {
let uid = DATABASE.lock_and_select("SELECT user_id FROM webui WHERE token=?1", params!(token)).unwrap_or_default();
if uid == String::new() || token.is_empty() {
return None;