Skip to content
Snippets Groups Projects
Verified Commit cac638f1 authored by Erick Hitter's avatar Erick Hitter
Browse files

Basic forecast layout

parent cef785c5
Branches
Tags
No related merge requests found
...@@ -95,7 +95,15 @@ app.post('/post', function(req, res){ ...@@ -95,7 +95,15 @@ app.post('/post', function(req, res){
} }
// Build forecast into a table // Build forecast into a table
var forecastData = JSON.parse( body );
var forecastBody = "---\n#### **Forecast as of " + forecastData.forecast.txt_forecast.date + '**';
forecastBody += "| Day | Description | High | Low |";
forecastBody += "|:--------------------|:---------------------------------|:-------|:-------|";
forecastBody += "| Monday, Feb. 15 | Cloudy with a chance of flurries | 3 °C | -12 °C |";
forecastBody += '---';
responseBody.attachments[1] = { "text": forecastBody };
res.send( responseBody ); res.send( responseBody );
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment