fix problems with rendering data

This commit is contained in:
Eric Hulburd
2016-02-21 18:40:55 -06:00
parent a84df34b55
commit c1fddd944e
28 changed files with 456 additions and 158 deletions

View File

@@ -7,7 +7,7 @@ class HousesController {
static index(req, res){
var params = {};
if (req.query.ids) query.id = ids;
DB.House.findAll({where: params, attributes: ['id', 'name', 'timezone']}).then((houses)=>{
DB.House.findAll({where: params}).then((houses)=>{
res.json({data: houses.map((house)=>{ return house.dataValues; })});
});
}