mirror of
https://gitlab.silvrtree.co.uk/martind2000/old-silvrgit.git
synced 2025-01-10 21:45:08 +00:00
updated weather to include temp
This commit is contained in:
parent
23fe4912ec
commit
f7c331cc78
11
lib/today.js
11
lib/today.js
@ -250,10 +250,21 @@ module.exports = {
|
||||
forecast.get(55.8582846, -4.2593033, {units: 'uk2'}, function (err, res, data) {
|
||||
if (err) throw err;
|
||||
|
||||
var tempMin = parseInt(data.daily.data[0].temperatureMin);
|
||||
var tempMax = parseInt(data.daily.data[0].temperatureMax);
|
||||
|
||||
j.currently = data.currently.summary;
|
||||
j.today = data.daily.data[0].summary;
|
||||
j.later = data.daily.summary;
|
||||
j.alerts = data.alerts || {};
|
||||
|
||||
if (tempMax == tempMin) {
|
||||
data.currently.summary += '<br/>Around ' + tempMin.toString() + ' degrees.';
|
||||
}
|
||||
else
|
||||
{
|
||||
data.currently.summary += '<br/>Around ' + tempMin.toString() + ' to ' + tempMax.toString() + ' degrees.';
|
||||
}
|
||||
todayCache.data.weather = j;
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user