2016-02-07 15:32:02 -06:00
|
|
|
import DB from './../config/database.js';
|
|
|
|
|
|
2016-02-09 11:16:49 -06:00
|
|
|
const NAME = 'PowerController';
|
|
|
|
|
|
2016-02-07 15:32:02 -06:00
|
|
|
class PowerController{
|
|
|
|
|
|
|
|
|
|
static index(req, res){
|
2016-02-10 16:11:56 -06:00
|
|
|
DB.PowerDatum.exposeForHouseAtDates(req.query.house_id, req.query.dates).then((power_data)=>{
|
|
|
|
|
res.json({data: power_data});
|
2016-02-07 15:32:02 -06:00
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
2016-02-09 11:16:49 -06:00
|
|
|
|
|
|
|
|
PowerController.NAME = NAME;
|
|
|
|
|
module.exports = PowerController;
|