diff --git a/src/app/api/live-tracking/property-documents/route.ts b/src/app/api/live-tracking/property-documents/route.ts index c8821de6..16e2f9ae 100644 --- a/src/app/api/live-tracking/property-documents/route.ts +++ b/src/app/api/live-tracking/property-documents/route.ts @@ -44,7 +44,7 @@ export async function GET(req: Request) { // that was already processed: same S3 key gets a new version, but a new DB row // is written each time. // - // Step 1: same s3FileKey → keep the row with the highest id (latest insert). + // Step 1: same s3FileKey → keep the row with the most recent upload timestamp. const latestByS3Key = new Map(); for (const row of rows) { const existing = latestByS3Key.get(row.s3FileKey);