Hi guys,
i am trying to make the actual weather api stuff work. But i can´t seem to get it right. It looks like the context.forecast = forecast is always 0 despite the function getWeather returning the actual value.. Any help on that one?
// list of functions Wit.ai can execute
['fetch-weather'](sessionId, context, cb) {
// Here we can place an API call to a weather service
if (context.loc) {
getWeather(context.loc)
.then(function (forecast) {
context.forecast = forecast
console.log(forecast)
})
.catch(function (err) {
console.log(err)
})
}
cb(context)
},
Hi guys,
i am trying to make the actual weather api stuff work. But i can´t seem to get it right. It looks like the context.forecast = forecast is always 0 despite the function getWeather returning the actual value.. Any help on that one?