18 lines
367 B
JavaScript
18 lines
367 B
JavaScript
import DB from './../config/database.js';
|
|
|
|
const NAME = 'PowerController';
|
|
|
|
class PowerController{
|
|
|
|
static index(req, res){
|
|
console.log(req.query);
|
|
DB.PowerDatum.exposeForHouseAtDates(req.query.house_id, req.query.dates).then((power_data)=>{
|
|
res.json({data: power_data});
|
|
});
|
|
}
|
|
|
|
}
|
|
|
|
PowerController.NAME = NAME;
|
|
module.exports = PowerController;
|