clean up development config

This commit is contained in:
Eric Hulburd
2016-02-09 11:16:49 -06:00
parent 109ad432bb
commit a334afbc01
20 changed files with 170 additions and 111 deletions

View File

@@ -1,13 +1,18 @@
import DB from './../config/database.js';
const NAME = 'EnergyController';
class EnergyController{
static index(req, res){
DB.House.findOne({where: {name: req.housename}}).then((house)=>{
house.getEnergyDataByTime(req.params.start_time, req.params.end_time).then((energy_data){
house.getEnergyDataByTime(req.params.start_time, req.params.end_time).then((energy_data)=>{
req.json(energy_data);
});
});
}
}
EnergyController.NAME = NAME;
module.exports = EnergyController;