From a9ee11e662e4a87a09d8d8a8eee9ef0b7cce5014 Mon Sep 17 00:00:00 2001 From: josephchimebuka Date: Thu, 28 Nov 2024 10:09:21 +0000 Subject: [PATCH] fix: update expiry filter to include current time in get_expiring_domains handler --- src/endpoints/get_expiring_domains.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/endpoints/get_expiring_domains.rs b/src/endpoints/get_expiring_domains.rs index 3354201..4111d62 100644 --- a/src/endpoints/get_expiring_domains.rs +++ b/src/endpoints/get_expiring_domains.rs @@ -40,7 +40,10 @@ pub async fn handler( let pipeline = vec![ doc! { "$match": { - "expiry": { "$lt": one_week_later }, + "expiry": { + "$lt": one_week_later, + "$gt": current_time + }, "_cursor.to": null } },