Skip to content

Commit

Permalink
fix tba api
Browse files Browse the repository at this point in the history
  • Loading branch information
realjoshuau committed Nov 22, 2023
1 parent bd71cd3 commit e301ebc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/tba/index.ts
Original file line number Diff line number Diff line change
@@ -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');
}

2 comments on commit e301ebc

@ThatXliner
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wth why not use a null check

@realjoshuau
Copy link
Member Author

@realjoshuau realjoshuau commented on e301ebc Nov 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idk, tbh i was half asleep when i wrote this (also you shouldn't be checking github on a break!)

Please sign in to comment.