From e3eb9d83f1c8cd08450974a4119a18abd13623f9 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Tue, 31 Oct 2023 08:19:25 -0700 Subject: [PATCH] fix: formatting --- netlify/edge-functions/now-playing.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/netlify/edge-functions/now-playing.js b/netlify/edge-functions/now-playing.js index 1d674d2e..350fdc3d 100644 --- a/netlify/edge-functions/now-playing.js +++ b/netlify/edge-functions/now-playing.js @@ -120,14 +120,16 @@ export default async () => { const startMinutes = parseInt(startTime.split(',')[1].split(':')[1].trim()) const endMinutes = parseInt(endTime.split(',')[1].split(':')[1].trim()) const res = { - text: `🏀 ${game['awayTeam']['teamName']} (${game['awayTeam']['wins']}-${game['awayTeam']['losses']}) @ ${game['homeTeam']['teamName']} (${game['homeTeam']['wins']}-${game['homeTeam']['losses']})`, - html: `🏀 ${game['awayTeam']['teamName']} (${game['awayTeam']['wins']}-${game['awayTeam']['losses']}) @ ${game['homeTeam']['teamName']} (${game['homeTeam']['wins']}-${game['homeTeam']['losses']})`, - } - + text: `🏀 ${game['awayTeam']['teamName']} (${game['awayTeam']['wins']}-${game['awayTeam']['losses']}) @ ${game['homeTeam']['teamName']} (${game['homeTeam']['wins']}-${game['homeTeam']['losses']})`, + html: `🏀 ${game['awayTeam']['teamName']} (${game['awayTeam']['wins']}-${game['awayTeam']['losses']}) @ ${game['homeTeam']['teamName']} (${game['homeTeam']['wins']}-${game['homeTeam']['losses']})`, + } + if (isCorrectDate) { - if (nowHour === startHour && nowMinutes >= startMinutes && nowHour < endHour) return Response.json(res) + if (nowHour === startHour && nowMinutes >= startMinutes && nowHour < endHour) + return Response.json(res) if (nowHour > startHour && nowHour < endHour) return Response.json(res) - if (nowHour > startHour && nowMinutes <= endMinutes && nowHour == endHour) return Response.json(res) + if (nowHour > startHour && nowMinutes <= endMinutes && nowHour == endHour) + return Response.json(res) } } }