Skip to content

Commit

Permalink
events api to v2
Browse files Browse the repository at this point in the history
  • Loading branch information
Frenkii committed Jan 20, 2024
1 parent 9444371 commit 40db69b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "discord-bot",
"version": "1.4.0",
"version": "1.4.1",
"scripts": {
"run": "tsc && node ./dist/src/index.js",
"commands:update": "rimraf ./dist && tsc && node ./dist/scripts/registerCommands.js",
Expand Down
4 changes: 2 additions & 2 deletions src/services/vatsimEventsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import dayjs from 'dayjs';

async function getAllVatsimEvents(): Promise<VatsimEvent[]> {
try {
const vatsimEvents = await axios.get('https://my.vatsim.net/api/v1/events/all');
const vatsimEvents = await axios.get('https://my.vatsim.net/api/v2/events/latest');
return vatsimEvents.data.data;
} catch (error) {
throw new Error('Error on retrieving VATSIM Events');
throw new Error(`Error on retrieving VATSIM Events: ${error}`);
}
}

Expand Down

0 comments on commit 40db69b

Please sign in to comment.