fix(saas): SQL type cast fixes for E2E relay flow
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled

- key_pool.rs: cast cooldown_until to timestamptz for comparison with NOW()
- key_pool.rs: cast request_count to bigint (INT4→INT8) for sqlx decoding
- service.rs: cast cooldown_until to timestamptz in quota sort query
- scheduler.rs: cast last_seen_at to timestamptz in device cleanup
- totp.rs: use DateTime<Utc> instead of rfc3339 string for updated_at
This commit is contained in:
iven
2026-04-07 22:24:19 +08:00
parent ca0e537682
commit f9303ae0c3
4 changed files with 7 additions and 7 deletions

View File

@@ -89,7 +89,7 @@ pub fn start_db_cleanup_tasks(db: PgPool) {
loop {
interval.tick().await;
match sqlx::query(
"DELETE FROM devices WHERE last_seen_at < $1"
"DELETE FROM devices WHERE last_seen_at::timestamptz < $1"
)
.bind({
let cutoff = (chrono::Utc::now() - chrono::Duration::days(90));