1
0

Update to original weather app to use weatherstack instead of darksky

This commit is contained in:
JayWll
2020-04-13 14:37:50 -06:00
parent 8555f4735b
commit c73e4f803c
2 changed files with 3 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ const geocode = (address, callback) => {
const url = 'https://api.mapbox.com/geocoding/v5/mapbox.places/' + encodeURIComponent(address) + '.json?access_token=pk.eyJ1IjoiamFzb24zMmRldiIsImEiOiJjazFsNHd5djcwMXptM2htbW8zM3MyZGxuIn0.-TtNNGFysQPQRfGR1P8DUA&limit=1'
request({ url, json: true }, (error, {body}) => {
console.log(body)
if (error) {
callback('Unable to connect to location services!', undefined)
} else if (body.features.length === 0) {