Merge branch 'master' of github.com:tellform/tellform
This commit is contained in:
commit
a3d203fee3
|
@ -125,15 +125,7 @@ exports.read = function(req, res) {
|
|||
if(!req.user || (req.form.admin.id !== req.user.id) ){
|
||||
readForRender(req, res);
|
||||
} else {
|
||||
FormSubmission.find({ form: req.form._id }).exec(function(err, _submissions) {
|
||||
if (err) {
|
||||
res.status(400).send({
|
||||
message: errorHandler.getErrorMessage(err)
|
||||
});
|
||||
}
|
||||
|
||||
var newForm = req.form.toJSON();
|
||||
newForm.submissions = _submissions;
|
||||
|
||||
if (req.userId) {
|
||||
if(req.form.admin._id+'' === req.userId+''){
|
||||
|
@ -144,7 +136,6 @@ exports.read = function(req, res) {
|
|||
});
|
||||
}
|
||||
return res.json(newForm);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
|
554
public/dist/application.js
vendored
554
public/dist/application.js
vendored
File diff suppressed because it is too large
Load diff
4
public/dist/application.min.css
vendored
4
public/dist/application.min.css
vendored
File diff suppressed because one or more lines are too long
12
public/dist/application.min.js
vendored
12
public/dist/application.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -19,7 +19,7 @@ angular.module('forms').directive('editSubmissionsFormDirective', ['$rootScope',
|
|||
var initController = function(){
|
||||
$http({
|
||||
method: 'GET',
|
||||
url: '/forms'+$scope.myform._id+'/submissions'
|
||||
url: '/forms/'+$scope.myform._id+'/submissions'
|
||||
}).then(function successCallback(response) {
|
||||
var defaultFormFields = _.cloneDeep($scope.myform.form_fields);
|
||||
|
||||
|
|
Loading…
Reference in a new issue