Skip to content

Commit

Permalink
Update API (#740)
Browse files Browse the repository at this point in the history
new endpoint, same script
  • Loading branch information
juanbrujo authored Jul 31, 2023
1 parent 5b73d50 commit 81481c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/vuelos-baratos.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ module.exports = robot => {
.replace('ú', 'u')
.replace('ñ', 'n')
.replace('ã', 'a')
msg.send(`Buscando el vuelo más barato para ${msg.match[1]} desde Santiago :airplane_departure: :loading:`)
robot.http(`https://huemul-airlines.herokuapp.com/city/${city}`).get()((err, res, body) => {
msg.send(`Buscando el vuelo más barato para ${msg.match[1]} desde Santiago, Chile :airplane_departure: :loading:`)
robot.http(`https://huemul-airlines.onrender.com/city/${city}`).get()((err, res, body) => {
if (err || res.statusCode !== 200) {
return robot.emit('error', err || new Error(`Status code ${res.statusCode}`), msg, 'vuelos-baratos')
}
Expand Down

0 comments on commit 81481c3

Please sign in to comment.