mirror of
https://git.verdigado.com/NB-Public/simple-wkd.git
synced 2024-12-05 03:12:50 +01:00
Fix typo
This commit is contained in:
parent
98f0563952
commit
d3a1860a2d
2 changed files with 3 additions and 3 deletions
|
@ -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}")]
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue