Syntax error, and removed old test function
This commit is contained in:
parent
eced94799b
commit
f068fd23a6
@ -222,7 +222,7 @@ Meteor.methods({
|
||||
if (currentclass.subscribers.indexOf(Meteor.userId()) != -1 &&
|
||||
["confirmations", "reports", "done"].indexOf(input[1]) != -1) {
|
||||
userindex = workobject[input[1]].indexOf(Meteor.userId())
|
||||
if userindex === -1 {
|
||||
if (userindex === -1) {
|
||||
workobject[input[1]] = workobject[input[1]].push(Meteor.userId());
|
||||
} else {
|
||||
workobject[input[1]] = workobject[input[1]].splice(userindex, 1);
|
||||
@ -332,11 +332,4 @@ Meteor.methods({
|
||||
Roles.removeUsersToRoles(userId, ['admin']);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function has(array, has) {
|
||||
for (var i = 0; i < array.length; i++) {
|
||||
if (array[i] === has) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user