|
|
|
@ -53,7 +53,10 @@ var utils = require('../public/src/utils');
|
|
|
|
|
addUserData(eventsData, 'targetUid', 'targetUser', next);
|
|
|
|
|
},
|
|
|
|
|
function (eventsData, next) {
|
|
|
|
|
eventsData.forEach(function (event) {
|
|
|
|
|
eventsData.filter(function (element) {
|
|
|
|
|
return element !== undefined;
|
|
|
|
|
})
|
|
|
|
|
.forEach(function (event) {
|
|
|
|
|
Object.keys(event).forEach(function (key) {
|
|
|
|
|
if (typeof event[key] === 'string') {
|
|
|
|
|
event[key] = validator.escape(String(event[key] || ''));
|
|
|
|
@ -100,7 +103,9 @@ var utils = require('../public/src/utils');
|
|
|
|
|
map[user.uid] = user;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
eventsData.forEach(function (event) {
|
|
|
|
|
eventsData.filter(function (element) {
|
|
|
|
|
return element !== undefined;
|
|
|
|
|
}).forEach(function (event) {
|
|
|
|
|
if (map[event[field]]) {
|
|
|
|
|
event[objectName] = map[event[field]];
|
|
|
|
|
}
|
|
|
|
|