From e301ebca6779b4921a0b53538067f9264f82242d Mon Sep 17 00:00:00 2001 From: Josh <102478723+realjoshuau@users.noreply.github.com> Date: Tue, 21 Nov 2023 22:42:56 -0800 Subject: [PATCH] fix tba api --- packages/tba/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/tba/index.ts b/packages/tba/index.ts index 7ce4f91..fe425a4 100644 --- a/packages/tba/index.ts +++ b/packages/tba/index.ts @@ -1,5 +1,7 @@ // docs: https://www.thebluealliance.com/apidocs/v3 export const tpaApiUrl = 'https://www.thebluealliance.com/api/v3'; export const statboticsApiUrl = 'https://api.statbotics.io/v2'; -export const apiKey = - process.env.TBA_API_KEY || 'euL6KYqI7bQU4QFj5HWTxmg46fhTp9CM1nM4IPGTNDbBNoog2HejA8HUn9enJMRf'; +export const apiKey = process.env.TBA_API_KEY || "whoops! shouldn't see this!"; +if (!apiKey || apiKey.includes('whoops')) { + throw new Error('no TBA API key found'); +}