From e67bc990fcaa58b717a5fdda1a15587d1627edbf Mon Sep 17 00:00:00 2001 From: Tanjil Date: Mon, 28 Oct 2024 11:46:58 +0000 Subject: [PATCH] fix: update nba league --- api/src/modules/sports/api/sports-routes.ts | 4 +- .../sports/data/basketball-nba-league-2024.ts | 276 ++++++++++++++++++ 2 files changed, 278 insertions(+), 2 deletions(-) create mode 100644 api/src/modules/sports/data/basketball-nba-league-2024.ts diff --git a/api/src/modules/sports/api/sports-routes.ts b/api/src/modules/sports/api/sports-routes.ts index c051a532..a41ba735 100644 --- a/api/src/modules/sports/api/sports-routes.ts +++ b/api/src/modules/sports/api/sports-routes.ts @@ -5,7 +5,7 @@ import { getRandomSubArray } from '../../../utils/arrays'; import PremierLeagueData2022 from '../data/football-premier-league-2022'; import LaLigaLeagueData2022 from '../data/football-laliga-league-2022'; import SerieALeagueData2022 from '../data/football-serie-a-league-2022'; -import BasketballNbaLeague2022 from '../data/basketball-nba-league-2022'; +import BasketballNbaLeague2024 from '../data/basketball-nba-league-2024'; import Ligue1LeagueData2022 from '../data/football-ligue-1-league-2022'; module.exports = function (app: core.Express) { @@ -32,7 +32,7 @@ module.exports = function (app: core.Express) { */ app.get('/sports/basketball/leagues/nba/teams/:qty?', (req: Request, res: Response) => { const qty = getQtyFromRequest(req); - res.json(getRandomSubArray(BasketballNbaLeague2022, qty)); + res.json(getRandomSubArray(BasketballNbaLeague2024, qty)); }); /** diff --git a/api/src/modules/sports/data/basketball-nba-league-2024.ts b/api/src/modules/sports/data/basketball-nba-league-2024.ts new file mode 100644 index 00000000..7cd6a7ad --- /dev/null +++ b/api/src/modules/sports/data/basketball-nba-league-2024.ts @@ -0,0 +1,276 @@ +import BasketBallTeam from '../consts/BasketBallTeam'; + +const NBALeagueData: BasketBallTeam[] = [ + { + abbr: 'ATL', + conference: 'Eastern', + division: 'Southeast', + city: 'Atlanta', + name: 'Hawks', + color: 'C8102E', + colors: ['C8102E', 'FFD100', '000000'], + }, + { + abbr: 'BOS', + conference: 'Eastern', + division: 'Atlantic', + city: 'Boston', + name: 'Celtics', + color: '007A33', + colors: ['007A33', 'BA9653', '963821'], + }, + { + abbr: 'BKN', + conference: 'Eastern', + division: 'Atlantic', + city: 'Brooklyn', + name: 'Nets', + color: '000000', + colors: ['000000', 'FFFFFF'], + }, + { + abbr: 'CHA', + conference: 'Eastern', + division: 'Southeast', + city: 'Charlotte', + name: 'Hornets', + color: '00788C', + colors: ['00788C', '1D1160', 'A1A1A4'], + }, + { + abbr: 'CHI', + conference: 'Eastern', + division: 'Central', + city: 'Chicago', + name: 'Bulls', + color: 'CE1141', + colors: ['CE1141', '000000'], + }, + { + abbr: 'CLE', + conference: 'Eastern', + division: 'Central', + city: 'Cleveland', + name: 'Cavaliers', + color: '860038', + colors: ['860038', 'FDBB30', '041E42'], + }, + { + abbr: 'DAL', + conference: 'Western', + division: 'Southwest', + city: 'Dallas', + name: 'Mavericks', + color: '00538C', + colors: ['00538C', '002B5E', '8D9093'], + }, + { + abbr: 'DEN', + conference: 'Western', + division: 'Northwest', + city: 'Denver', + name: 'Nuggets', + color: '0E2240', + colors: ['0E2240', 'FEC524', '8B2131'], + }, + { + abbr: 'DET', + conference: 'Eastern', + division: 'Central', + city: 'Detroit', + name: 'Pistons', + color: 'C8102E', + colors: ['C8102E', '1D42BA', 'BEC0C2'], + }, + { + abbr: 'GSW', + conference: 'Western', + division: 'Pacific', + city: 'Golden State', + name: 'Warriors', + color: '1D428A', + colors: ['1D428A', 'FFC72C'], + }, + { + abbr: 'HOU', + conference: 'Western', + division: 'Southwest', + city: 'Houston', + name: 'Rockets', + color: 'CE1141', + colors: ['CE1141', 'C4CED4', '000000'], + }, + { + abbr: 'IND', + conference: 'Eastern', + division: 'Central', + city: 'Indiana', + name: 'Pacers', + color: '002D62', + colors: ['002D62', 'FDBB30', 'BEC0C2'], + }, + { + abbr: 'LAC', + conference: 'Western', + division: 'Pacific', + city: 'Los Angeles', + name: 'Clippers', + color: 'C8102E', + colors: ['C8102E', '1D42BA', 'BEC0C2'], + }, + { + abbr: 'LAL', + conference: 'Western', + division: 'Pacific', + city: 'Los Angeles', + name: 'Lakers', + color: '552583', + colors: ['552583', 'FDB927', '000000'], + }, + { + abbr: 'MEM', + conference: 'Western', + division: 'Southwest', + city: 'Memphis', + name: 'Grizzlies', + color: '5D76A9', + colors: ['5D76A9', '12173F', 'F5B112'], + }, + { + abbr: 'MIA', + conference: 'Eastern', + division: 'Southeast', + city: 'Miami', + name: 'Heat', + color: '98002E', + colors: ['98002E', 'F9A01B', '000000'], + }, + { + abbr: 'MIL', + conference: 'Eastern', + division: 'Central', + city: 'Milwaukee', + name: 'Bucks', + color: '00471B', + colors: ['00471B', 'EEE1C6', '0077C0'], + }, + { + abbr: 'MIN', + conference: 'Western', + division: 'Northwest', + city: 'Minnesota', + name: 'Timberwolves', + color: '0C2340', + colors: ['0C2340', '236192', '78BE20'], + }, + { + abbr: 'NOP', + conference: 'Western', + division: 'Southwest', + city: 'New Orleans', + name: 'Pelicans', + color: '0C2340', + colors: ['0C2340', '85714D', 'E31837'], + }, + { + abbr: 'NYK', + conference: 'Eastern', + division: 'Atlantic', + city: 'New York', + name: 'Knicks', + color: '006BB6', + colors: ['006BB6', 'F58426', 'BEC0C2'], + }, + { + abbr: 'OKC', + conference: 'Western', + division: 'Northwest', + city: 'Oklahoma City', + name: 'Thunder', + color: '007AC1', + colors: ['007AC1', 'EF3B24', 'FDBB30'], + }, + { + abbr: 'ORL', + conference: 'Eastern', + division: 'Southeast', + city: 'Orlando', + name: 'Magic', + color: '0077C0', + colors: ['0077C0', 'C4CED4', '000000'], + }, + { + abbr: 'PHI', + conference: 'Eastern', + division: 'Atlantic', + city: 'Philadelphia', + name: '76ers', + color: '006BB6', + colors: ['006BB6', 'ED174C', '002B5C'], + }, + { + abbr: 'PHX', + conference: 'Western', + division: 'Pacific', + city: 'Phoenix', + name: 'Suns', + color: 'E56020', + colors: ['E56020', '1D1160', '63727A'], + }, + { + abbr: 'POR', + conference: 'Western', + division: 'Northwest', + city: 'Portland', + name: 'Trail Blazers', + color: 'E03A3E', + colors: ['E03A3E', '000000', 'BAC3C9'], + }, + { + abbr: 'SAC', + conference: 'Western', + division: 'Pacific', + city: 'Sacramento', + name: 'Kings', + color: '5A2D81', + colors: ['5A2D81', '63727A', '000000'], + }, + { + abbr: 'SAS', + conference: 'Western', + division: 'Southwest', + city: 'San Antonio', + name: 'Spurs', + color: 'C4CED4', + colors: ['C4CED4', '000000'], + }, + { + abbr: 'TOR', + conference: 'Eastern', + division: 'Atlantic', + city: 'Toronto', + name: 'Raptors', + color: 'CE1141', + colors: ['CE1141', '000000', 'A1A1A4'], + }, + { + abbr: 'UTA', + conference: 'Western', + division: 'Northwest', + city: 'Utah', + name: 'Jazz', + color: '002B5C', + colors: ['002B5C', '00471B', 'F9A01B'], + }, + { + abbr: 'WAS', + conference: 'Eastern', + division: 'Southeast', + city: 'Washington', + name: 'Wizards', + color: '002B5C', + colors: ['002B5C', 'E31837', 'C4CED4'], + }, +]; + +export default NBALeagueData;