From 21dc886e5f5f42fb39597fe2b25dcaf464c7fd27 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Fri, 29 Mar 2024 10:33:44 -0700 Subject: [PATCH] chore: debug --- api/scrobble.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/api/scrobble.js b/api/scrobble.js index ac6d140f..198fbe11 100644 --- a/api/scrobble.js +++ b/api/scrobble.js @@ -5,11 +5,7 @@ export default async (request, context) => { const params = new URL(request['url']).searchParams const id = params.get('id') const data = await request.formData() - const payload = data['payload'] - - console.log(data) - console.log(payload) - console.log(typeof payload) + const payload = data.get('payload') const debug = getStore('debug') await debug.setJSON('debug', JSON.stringify(payload)) @@ -28,6 +24,9 @@ export default async (request, context) => { if (payload?.event === 'media.scrobble') { console.log('scrobble') + console.log(data) + console.log(payload) + console.log(typeof payload) } return new Response(JSON.stringify({