From 42277699a71ba054cdc09655dea474b54099d7de Mon Sep 17 00:00:00 2001 From: philipp Date: Sun, 14 Apr 2024 20:28:06 +0200 Subject: [PATCH] hide old verified boat damages --- src/model/boatdamage.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/model/boatdamage.rs b/src/model/boatdamage.rs index 1f9802e..ce4988b 100644 --- a/src/model/boatdamage.rs +++ b/src/model/boatdamage.rs @@ -73,6 +73,10 @@ impl BoatDamage { " SELECT id, boat_id, desc, user_id_created, created_at, user_id_fixed, fixed_at, user_id_verified, verified_at, lock_boat FROM boat_damage +WHERE ( + verified_at IS NULL + OR verified_at >= datetime('now', '-30 days') + ) ORDER BY created_at DESC " ) -- 2.45.2