Skip to content

Commit

Permalink
ran prettier
Browse files Browse the repository at this point in the history
Signed-off-by: 73cirdan <73cirdan@gmail.com>
  • Loading branch information
73cirdan committed May 27, 2022
1 parent d57c54c commit 1938ba9
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions node_helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ module.exports = NodeHelper.create({
console.log(this.name + " is fetching " + this.config.type + " standings for the " + this.config.season + " season");
const endpoint = this.config.type === "DRIVER" ? "getDriverStandings" : "getConstructorStandings";
const season = (this.config.season === "current", new Date().getFullYear(), this.config.season);
const self=this;
const self = this;
f1Api[endpoint](season).then((standings) => {
console.log(this.name + " is returning " + this.config.type + " standings for the " + season + " season");
this.sendSocketNotification(this.config.type + "_STANDINGS", standings);
this.standingsTimerId = setTimeout(function() {self.fetchStandings();}, this.config.reloadInterval);
this.standingsTimerId = setTimeout(function () {
self.fetchStandings();
}, this.config.reloadInterval);
});
},

Expand All @@ -63,13 +65,15 @@ module.exports = NodeHelper.create({
fetchSchedule: function () {
console.log(this.name + " is fetching the race schedule for the " + this.config.season + " season");
const season = (this.config.season === "current", new Date().getFullYear(), this.config.season);
const self=this;
const self = this;
f1Api.getSeasonRacesSchedule(season).then((raceSchedule) => {
if (raceSchedule) {
raceScheduleDB = raceSchedule;
this.sendSocketNotification("RACE_SCHEDULE", raceSchedule);
}
this.scheduleTimerId = setTimeout(function() {self.fetchSchedule();}, this.config.reloadInterval);
this.scheduleTimerId = setTimeout(function () {
self.fetchSchedule();
}, this.config.reloadInterval);
});
},

Expand Down

0 comments on commit 1938ba9

Please sign in to comment.