Skip to content

Commit

Permalink
Fix ontime field
Browse files Browse the repository at this point in the history
  • Loading branch information
christoph2806 committed Jan 23, 2021
1 parent 66dc375 commit 66003c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/flightStatsService.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ ${this.flightStatsBaseURL}${this.flightRatingsEndpoint}\
async getQuote (ctx, data) { // data = { premium, carrier, flightNumber }
await this.tg.send(`Get Quote: ${JSON.stringify(data)}`)
const { ratings } = await this.fetchEndpoint(this.getRatingsEndpoint(data))
const rating = (({observations, late15, late30, late45, cancelled, diverted}) =>
({observations, late15, late30, late45, cancelled, diverted}))(ratings[0])
const rating = (({observations, ontime, late15, late30, late45, cancelled, diverted}) =>
({observations, ontime, late15, late30, late45, cancelled, diverted}))(ratings[0])
const { premium } = data
const product = 'FlightDelaySokol'
const contractName = 'FlightDelayEtheriscOracle'
Expand Down

0 comments on commit 66003c3

Please sign in to comment.