This commit is contained in:
2023-10-12 09:13:06 +07:00
parent 3b46e71525
commit 35650a40f2
36 changed files with 444 additions and 1447 deletions

View File

@@ -99,10 +99,13 @@ fn secure_save(key: String, value: String) -> Result<(), ()> {
}
#[tauri::command]
fn secure_load(key: String) -> Result<String, ()> {
fn secure_load(key: String) -> Result<String, String> {
let entry = Entry::new("lume", &key).expect("Failed to create entry");
let password = entry.get_password().unwrap();
Ok(password)
if let Ok(password) = entry.get_password() {
Ok(password)
} else {
Err("not found".to_string())
}
}
fn main() {