mirror of
https://github.com/wekan/wekan.git
synced 2026-01-01 15:18:49 +01:00
createCardWithDueDate
This commit is contained in:
parent
c8d1a576b0
commit
ba387bcc84
1 changed files with 21 additions and 0 deletions
|
|
@ -2943,6 +2943,27 @@ function cardCreation(userId, doc) {
|
|||
});
|
||||
}
|
||||
|
||||
Meteor.methods({
|
||||
createCardWithDueDate: function(boardId, listId, title, dueDate, swimlaneId) {
|
||||
check(boardId, String);
|
||||
check(listId, String);
|
||||
check(title, String);
|
||||
check(dueDate, Date);
|
||||
check(swimlaneId, String);
|
||||
const card = {
|
||||
title,
|
||||
listId,
|
||||
boardId,
|
||||
swimlaneId,
|
||||
createdAt: new Date(),
|
||||
dueAt: dueDate,
|
||||
sort: 0,
|
||||
};
|
||||
const cardId = Cards.insert(card);
|
||||
return cardId;
|
||||
},
|
||||
});
|
||||
|
||||
function cardRemover(userId, doc) {
|
||||
ChecklistItems.remove({
|
||||
cardId: doc._id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue