From 88e680f12b29932a2f2ea3c6c54e0fffce407e4d Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Thu, 10 Jul 2025 21:10:40 -0500 Subject: [PATCH] Adjust recent photos query --- src/photo/db/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/photo/db/index.ts b/src/photo/db/index.ts index e4f180cb..fca80201 100644 --- a/src/photo/db/index.ts +++ b/src/photo/db/index.ts @@ -103,9 +103,9 @@ export const getWheresFromOptions = ( // Newest upload must be within past 2 weeks // eslint-disable-next-line max-len wheres.push('(SELECT MAX(created_at) FROM photos) >= (now() - INTERVAL \'14 days\')'); - // Selects must be within 2 weeks of newest upload + // Selects must be within 1 week of newest upload // eslint-disable-next-line max-len - wheres.push('created_at >= (SELECT MAX(created_at) - INTERVAL \'14 days\' FROM photos)'); + wheres.push('created_at >= (SELECT MAX(created_at) - INTERVAL \'7 days\' FROM photos)'); } if (year) { wheres.push(`EXTRACT(YEAR FROM taken_at) = $${valuesIndex++}`);