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 = 'PowerController';
class PowerController{
static index(req, res){
DB.House.findOne({where: {name: req.housename}}).then((house)=>{
house.getPowerDataByTime(req.params.start_time, req.params.end_time).then((power_data){
house.getPowerDataByTime(req.params.start_time, req.params.end_time).then((power_data)=>{
res.json(power_data);
});
});
}
}
PowerController.NAME = NAME;
module.exports = PowerController;