0
0
Fork 0
mirror of https://git.verdigado.com/NB-Public/simple-wkd.git synced 2024-12-05 03:12:50 +01:00
This commit is contained in:
Delta1925 2023-04-13 23:51:09 +02:00
parent 98f0563952
commit d3a1860a2d
No known key found for this signature in database
GPG key ID: 1C21ACE44193CB25
2 changed files with 3 additions and 3 deletions

View file

@ -66,7 +66,7 @@ async fn submit(pem: web::Form<Pem>) -> Result<String> {
#[get("/api/confirm/{value}")]
async fn confirm(token: web::Path<Token>) -> Result<String> {
confirm_action(&token.value)?;
Ok(String::from("Confirmation successfull!"))
Ok(String::from("Confirmation successful!"))
}
#[get("/api/delete/{address}")]

View file

@ -84,10 +84,10 @@ pub fn clean_stale(max_age: i64) -> Result<(), Error> {
};
let now = Utc::now().timestamp();
if now - key.timestamp() > max_age {
if fs::remove_file(&file_path).is_err() {
let err = fs::remove_file(&file_path).is_err();
if err {
return Err(Error::Inaccessible);
}
println!("Deleted {}, since it was stale", &file_path.display());
}
}
}