createWork optimizations
This commit is contained in:
parent
fc57be9d93
commit
5569b574bf
@ -455,13 +455,8 @@ Meteor.methods({
|
|||||||
});
|
});
|
||||||
var security = securityCheck([[[8, 9, true], 16, false], 10, 20, 11, 12, true],
|
var security = securityCheck([[[8, 9, true], 16, false], 10, 20, 11, 12, true],
|
||||||
Object.assign(found || {}, input, {userId: Meteor.userId()}));
|
Object.assign(found || {}, input, {userId: Meteor.userId()}));
|
||||||
console.log(security);
|
|
||||||
if (!security) {
|
if (!security) {
|
||||||
input.confirmations = [Meteor.userId()];
|
input = Object.assign(input, {confirmations: [Meteor.userId()], reports: [], done: [], numberdone: 0, comments: []});
|
||||||
input.reports = [];
|
|
||||||
input.done = [];
|
|
||||||
input.numberdone = 0;
|
|
||||||
input.comments = [];
|
|
||||||
work.insert(input);
|
work.insert(input);
|
||||||
} else {
|
} else {
|
||||||
throw new Meteor.Error(errors[security]);
|
throw new Meteor.Error(errors[security]);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user