Skip to content

Commit

Permalink
Adjusted data to fix incoming to UTF-8
Browse files Browse the repository at this point in the history
  • Loading branch information
tomcoombs2000 committed Mar 29, 2024
1 parent 6117887 commit c3c1e1e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ const pollVatsim = async () => {
await PilotOnline.deleteMany({}).exec();

console.log("Fetching data from VATSIM.");
const {data} = await axios.get('https://data.vatsim.net/v3/vatsim-data.json');
const {vatsimdata} = await axios.get('https://data.vatsim.net/v3/vatsim-data.json');
const data = vatsimdata.data.toString('utf-8');

// PILOTS

Expand Down

0 comments on commit c3c1e1e

Please sign in to comment.