Skip to content

Commit 50a7a07

Browse files
authored
Merge pull request #84 from CodeForBaltimore/HOTFIX-entity-size
SIGNIFIGANT performance improvement
2 parents a5b52be + 733c63c commit 50a7a07

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

src/routes/entity.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,6 @@ router.get('/', async (req, res) => {
1313
const entities = await req.context.models.Entity.findAll({
1414
});
1515

16-
for (let entity of entities) {
17-
entity.dataValues.contacts = []
18-
19-
const contacts = await req.context.models.Entity.findContacts(entity.id);
20-
21-
if (contacts) {
22-
for (let contact of contacts) {
23-
entity.dataValues.contacts.push({
24-
contact
25-
});
26-
}
27-
}
28-
}
29-
3016
code = 200;
3117
message = {
3218
_meta: {

0 commit comments

Comments
 (0)