@dhyasama/totem-models 8.98.0 → 8.99.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Round.js +7 -1
- package/package.json +1 -1
package/lib/Round.js
CHANGED
|
@@ -107,6 +107,11 @@ module.exports = function(mongoose, config) {
|
|
|
107
107
|
|
|
108
108
|
_.each(grouped, function(rounds) {
|
|
109
109
|
|
|
110
|
+
var websites = [];
|
|
111
|
+
if(rounds[0].organization.website) websites.push(rounds[0].organization.wesite);
|
|
112
|
+
if(rounds[0].organization.websiteAliases) websites = _.union(websites, websiteAliases);
|
|
113
|
+
websites = _.uniq(websites);
|
|
114
|
+
|
|
110
115
|
// construct the org
|
|
111
116
|
var org = {
|
|
112
117
|
_id: rounds[0].organization._id,
|
|
@@ -114,7 +119,8 @@ module.exports = function(mongoose, config) {
|
|
|
114
119
|
name: rounds[0].organization.name,
|
|
115
120
|
logoUrl: rounds[0].organization.logoUrl,
|
|
116
121
|
description: rounds[0].organization.description,
|
|
117
|
-
status: rounds[0].organization.status
|
|
122
|
+
status: rounds[0].organization.status,
|
|
123
|
+
websites: websites
|
|
118
124
|
};
|
|
119
125
|
|
|
120
126
|
var performance = calculatePerformance(rounds);
|