mirror of
https://github.com/wekan/wekan.git
synced 2025-04-20 12:07:11 -04:00
Merge branch 'zarnifoulette-devel' into devel
Fix: REST API: Add PUT method to update a card. Thanks to zarnifoulette ! Related to #1037
This commit is contained in:
commit
9ccffe5342
2 changed files with 5 additions and 4 deletions
|
@ -2,7 +2,8 @@
|
|||
|
||||
This release adds the following new features:
|
||||
|
||||
* [REST API: Add PUT method to update a card](https://github.com/wekan/wekan/pull/1095).
|
||||
* [REST API: Add PUT method to update a card](https://github.com/wekan/wekan/pull/1095) and
|
||||
[related fix](https://github.com/wekan/wekan/pull/1097).
|
||||
|
||||
Thanks to GitHub user zarnifoulette for contributions!
|
||||
|
||||
|
|
|
@ -425,17 +425,17 @@ if (Meteor.isServer) {
|
|||
const paramBoardId = req.params.boardId;
|
||||
const paramCardId = req.params.cardId;
|
||||
const paramListId = req.params.listId;
|
||||
if(req.body.title !== undefined){
|
||||
if(req.body.hasOwnProperty('title')){
|
||||
const newTitle = req.body.title;
|
||||
Cards.update({ _id: paramCardId, listId: paramListId, boardId: paramBoardId, archived: false },
|
||||
{$set:{title:newTitle}});
|
||||
}
|
||||
if(req.body.listId !== undefined){
|
||||
if(req.body.hasOwnProperty('listId')){
|
||||
const newParamListId = req.body.listId;
|
||||
Cards.update({ _id: paramCardId, listId: paramListId, boardId: paramBoardId, archived: false },
|
||||
{$set:{listId:newParamListId}});
|
||||
}
|
||||
if(req.body.description !== undefined){
|
||||
if(req.body.hasOwnProperty('description')){
|
||||
const newDescription = req.body.description;
|
||||
Cards.update({ _id: paramCardId, listId: paramListId, boardId: paramBoardId, archived: false },
|
||||
{$set:{description:newDescription}});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue