fixed jshint errors

This commit is contained in:
David Baldwynn 2017-11-23 19:05:44 -08:00
parent 222ce4d641
commit 9723d577d3
2 changed files with 2 additions and 3 deletions

View file

@ -326,7 +326,7 @@ exports.read = function(req, res) {
});
}
newForm = helpers.removeSensitiveModelData('private_form', req.form.toJSON());
var newForm = helpers.removeSensitiveModelData('private_form', req.form.toJSON());
return res.json(newForm);
}
@ -560,7 +560,6 @@ exports.formByIDFast = function(req, res, next, id) {
*/
exports.hasAuthorization = function(req, res, next) {
var form = req.form;
debugger
if (req.form.admin.id !== req.user.id || req.user.roles.indexOf('admin') > -1) {
res.status(403).send({
message: 'User '+req.user.username+' is not authorized to edit Form: '+form.title

View file

@ -57,7 +57,7 @@ FormSubmissionSchema.pre('save', function (next) {
this.form_fields[i].fieldValue = this.form_fields[i].fieldValue.option_value;
}
helpers.removeKeysFromDict(form_fields[i], constants.extraneousFormFieldProps);
helpers.removeKeysFromDict(this.form_fields[i], constants.extraneousFormFieldProps);
}
next();
});