Reorganize files, keep table from moving on alert

This commit is contained in:
SinTan1729
2023-04-10 11:31:34 -05:00
parent 2f48b1e58c
commit e18a71a73c
6 changed files with 12 additions and 10 deletions

View File

@@ -32,7 +32,7 @@ fn check(token: Option<String>) -> bool {
.duration_since(SystemTime::UNIX_EPOCH)
.expect("Time went backwards!")
.as_secs();
if token_text == "valid-session-token" && time_now < token_time + 1209600 {
if token_text == "session-token" && time_now < token_time + 1209600 {
// There are 1209600 seconds in 14 days
true
} else {
@@ -43,7 +43,7 @@ fn check(token: Option<String>) -> bool {
}
pub fn gen_token() -> String {
let token_text = "valid-session-token".to_string();
let token_text = "session-token".to_string();
let time = SystemTime::now()
.duration_since(SystemTime::UNIX_EPOCH)
.expect("Time went backwards!")

View File

@@ -59,7 +59,7 @@ async fn siteurl(session: Session) -> HttpResponse {
// 404 error page
#[get("/err/404")]
async fn error404() -> impl Responder {
NamedFile::open_async("./resources/404.html").await
NamedFile::open_async("./resources/static/404.html").await
}
// Handle a given shortlink