diff --git a/models/temperature.js b/models/temperature.js index 8b560ca..9277961 100644 --- a/models/temperature.js +++ b/models/temperature.js @@ -3,7 +3,7 @@ var mongoose = require('mongoose'); var temperatureSchema = new mongoose.Schema({ temperature: String, humidity: String, - located: String, + location: String, updated: {type: Date, default: Date.now} }); diff --git a/routes/temperature.js b/routes/temperature.js index b7152dd..011cfb6 100644 --- a/routes/temperature.js +++ b/routes/temperature.js @@ -25,6 +25,7 @@ router.post('/', function(req, res, next) { }); + console.log("--information saved--"); res.send("Information Logged"); @@ -32,6 +33,7 @@ router.post('/', function(req, res, next) { else{ + console.log("--information not saved--"); res.send("Invalid Authentication"); } diff --git a/views/index.ejs b/views/index.ejs index bb252ff..8c8237b 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -8,7 +8,7 @@
ESP8266 With DHT11 Sensor
- Location: <%=query.located%> + Location: <%=query.location%>
Temperature: <%=query.temperature%>°F