{"version":3,"file":"team-service-dcf21756.js","sources":["../../src/services/team-service.ts"],"sourcesContent":["import axios from './axios'\r\n\r\nconst getLeagueTeams = async (id: number) => {\r\n\ttry {\r\n\t\tconst endpoint = `/teams/league/${id}`\r\n\r\n\t\tconst response = await axios.get(endpoint)\r\n\t\treturn response.data\r\n\t} catch (error: unknown) {\r\n\t\treturn new Error('Network error or no response')\r\n\t}\r\n}\r\n\r\nconst getTeamsByID = async (teamId: number, competitionId: number) => {\r\n\ttry {\r\n\t\tconst endpoint = `/teams/${teamId}/${competitionId}`\r\n\r\n\t\tconst response = await axios.get(endpoint)\r\n\t\treturn response.data\r\n\t} catch (error: unknown) {\r\n\t\treturn new Error('Network error or no response')\r\n\t}\r\n}\r\n\r\nconst teamsService = {\r\n\tgetLeagueTeams,\r\n\tgetTeamsByID\r\n}\r\n\r\nexport default teamsService\r\n"],"names":["getLeagueTeams","id","endpoint","axios","getTeamsByID","teamId","competitionId","teamsService"],"mappings":"wCAEA,MAAMA,EAAiB,MAAOC,GAAe,CACxC,GAAA,CACG,MAAAC,EAAW,iBAAiBD,CAAE,GAGpC,OADiB,MAAME,EAAM,IAAID,CAAQ,GACzB,UACQ,CACjB,OAAA,IAAI,MAAM,8BAA8B,CAChD,CACD,EAEME,EAAe,MAAOC,EAAgBC,IAA0B,CACjE,GAAA,CACH,MAAMJ,EAAW,UAAUG,CAAM,IAAIC,CAAa,GAGlD,OADiB,MAAMH,EAAM,IAAID,CAAQ,GACzB,UACQ,CACjB,OAAA,IAAI,MAAM,8BAA8B,CAChD,CACD,EAEMK,EAAe,CACpB,eAAAP,EACA,aAAAI,CACD"}