fix(server): check timestamps and add missing import

This commit is contained in:
Anna 2023-10-06 02:07:14 -04:00
parent b1a50268e0
commit fb4c85b9cf
Signed by: anna
GPG Key ID: D0943384CD9F87D1
1 changed files with 4 additions and 2 deletions

View File

@ -8,6 +8,8 @@ use axum::error_handling::HandleErrorLayer;
use axum::extract::{FromRequest, Path, State};
use axum::extract::rejection::BytesRejection;
use axum::http::{HeaderValue, Request, StatusCode};
#[cfg(not(debug_assertions))]
use axum::http::Method;
use axum::response::{IntoResponse, Response};
use axum::routing::{get, post};
use bytes::Bytes;
@ -79,7 +81,7 @@ async fn territory(
max_hp
from players
where territory = ?
--and unixepoch('now') - unixepoch(timestamp) < 30
and unixepoch('now') - unixepoch(timestamp) < 30
"#,
territory,
)
@ -112,7 +114,7 @@ async fn territory_world(
from players
where territory = ?
and current_world = ?
--and unixepoch('now') - unixepoch(timestamp) < 30
and unixepoch('now') - unixepoch(timestamp) < 30
"#,
territory,
world,