Skip to content

Commit

Permalink
[UPDATE]
Browse files Browse the repository at this point in the history
  • Loading branch information
Spottus committed May 13, 2020
1 parent 16a4ca8 commit 4be0c81
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/arduino/register.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const { Board, Thermometer } = require("johnny-five");
const sqlite3 = require('sqlite3').verbose();
const fs = require('fs');


Expand Down
4 changes: 2 additions & 2 deletions src/temperature/temperature.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ const {database} = require('./temperature.service');

temperature = express.Router();

temperature.get('/hour-Avg/:hours', ( req, res ) => {
temperature.get('/hour-Avg/:hours/:day', ( req, res ) => {

var query = `SELECT avg(celsius) FROM log where log.hours = '${req.params.hours}'; );`
var query = `SELECT avg(celsius) FROM log where log.hours = '${req.params.hours}' and log.day = '${req.params.day}';);`

database.get(query, (err,row) =>{
if(err) {
Expand Down

0 comments on commit 4be0c81

Please sign in to comment.