diff --git a/api/scrobble.js b/api/scrobble.js index d0d6cf2c..1c46266f 100644 --- a/api/scrobble.js +++ b/api/scrobble.js @@ -14,8 +14,6 @@ const weekStop = () => { return nextSunday.toMillis() } -weekStop() - export default async (request, context) => { const ACCOUNT_ID_PLEX = Netlify.env.get("ACCOUNT_ID_PLEX"); const MUSIC_KEY = Netlify.env.get("API_KEY_LASTFM"); @@ -92,6 +90,8 @@ export default async (request, context) => { } await artists.setJSON(artistKey, JSON.stringify(artistData)) } + + weekStop() } return new Response(JSON.stringify({