Passing tests for invite routes

This commit is contained in:
shockrah
2021-02-25 16:05:46 -08:00
parent 212173f543
commit 05acbfa94e
3 changed files with 39 additions and 25 deletions

View File

@@ -37,9 +37,8 @@ async fn valid_invite(pool: &Pool, id: BigInt) -> bool {
if let Some(invite) = query {
// if expires at all
if invite.expires {
let now = Utc::now().timestamp();
let now = Utc::now().timestamp_millis();
// old?
println!("{} {}", now, invite.id);
let mut valid_status = now < invite.id;
// used?
if invite.uses.is_some() && valid_status == false {