additional date checking
This commit is contained in:
parent
70d20ea40b
commit
a35182ae82
@ -182,7 +182,8 @@ Meteor.methods({
|
||||
Meteor.user().profile.classes.indexOf(input.class) !== -1 &&
|
||||
found.banned.indexOf(Meteor.userId()) === -1 &&
|
||||
found.blockEdit.indexOf(Meteor.userId()) === -1 &&
|
||||
input.dueDate.getTime() >= ref && worktype.indexOf(input.type) != -1 &&
|
||||
input.dueDate instanceof Date && input.dueDate.getTime() >= ref &&
|
||||
worktype.indexOf(input.type) != -1 &&
|
||||
input.name.length <= 50 && input.description.length <= 150) {
|
||||
|
||||
input.confirmations = [Meteor.userId()];
|
||||
@ -229,7 +230,8 @@ Meteor.methods({
|
||||
} else if (Meteor.userId() === work.findOne({
|
||||
_id: change._id
|
||||
}).creator) {
|
||||
if (change.name.length <= 50 && worktype.indexOf(change.type) != -1 && input.dueDate.getTime() >= ref) {
|
||||
if (change.name.length <= 50 && worktype.indexOf(change.type) != -1 &&
|
||||
input.dueDate instanceof Date && input.dueDate.getTime() >= ref) {
|
||||
Meteor.update({
|
||||
_id: change._id
|
||||
}, {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user