fix(server): check timestamps and add missing import
This commit is contained in:
parent
b1a50268e0
commit
fb4c85b9cf
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue