Adds start and due date to cards model.

This commit is contained in:
shoetten 2016-01-29 21:10:22 +01:00
parent 1ad4107201
commit 89df0bda9b

View file

@ -56,6 +56,14 @@ Cards.attachSchema(new SimpleSchema({
type: [String],
optional: true,
},
startAt: {
type: Date,
optional: true,
},
dueAt: {
type: Date,
optional: true,
},
// XXX Should probably be called `authorId`. Is it even needed since we have
// the `members` field?
userId: {
@ -207,6 +215,22 @@ Cards.mutations({
unsetCover() {
return { $unset: { coverId: '' }};
},
setStart(startAt) {
return { $set: { startAt }};
},
unsetStart() {
return { $unset: { startAt: '' }};
},
setDue(dueAt) {
return { $set: { dueAt }};
},
unsetDue() {
return { $unset: { dueAt: '' }};
},
});
if (Meteor.isServer) {