diff --git a/app/controllers/helpers.server.controller.js b/app/controllers/helpers.server.controller.js index f769187f..0f224a3b 100644 --- a/app/controllers/helpers.server.controller.js +++ b/app/controllers/helpers.server.controller.js @@ -1,14 +1,9 @@ 'use strict'; +const constants = require('../libs/constants'); + module.exports = { removeSensitiveModelData: function(type, object){ - var privateFields = { - 'public_form': ['__v', 'analytics.visitors', 'analytics.views', 'analytics.conversionRate', 'analytics.fields', 'lastModified', 'created'], - 'private_form': ['__v'], - 'public_user': ['passwordHash', 'password', 'provider', 'salt', 'lastModified', 'created', 'resetPasswordToken', 'resetPasswordExpires', 'token', 'apiKey', '__v'], - 'private_user': ['passwordHash', 'password', 'provider', 'salt', 'resetPasswordToken', 'resetPasswordExpires', 'token', '__v'] - }; - function removeKeysFromDict(dict, keys){ for(var i=0; i static',