From 14706f42179d4b25f2806e430e3899c46ae6d4c9 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Fri, 29 Mar 2024 16:36:31 -0700 Subject: [PATCH] chore: scrobbles --- api/scrobble.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/scrobble.js b/api/scrobble.js index e5212cca..c577dfdb 100644 --- a/api/scrobble.js +++ b/api/scrobble.js @@ -15,8 +15,8 @@ const weekStop = () => { const filterOldScrobbles = (scrobbles) => { const twoWeeksAgo = DateTime.now().minus({ weeks: 2 }); - return scrobbles.filter(obj => { - const timestamp = DateTime.fromISO(obj.timestamp); + return scrobbles.filter(scrobble => { + const timestamp = DateTime.fromISO(scrobble.timestamp); return timestamp >= twoWeeksAgo; }); }