diff options
author | zago <arnaud.zago@gmail.com> | 2017-06-29 14:10:45 +0200 |
---|---|---|
committer | zago <arnaud.zago@gmail.com> | 2017-06-29 14:10:45 +0200 |
commit | 95f1772280d453c3ad55486806f17cb6b445359d (patch) | |
tree | b4374b690de36e54866a77ec2b0fb5c90649818d | |
parent | 3a99eb9c9f708737c95202129c032ae12ea271e7 (diff) | |
download | wekan-95f1772280d453c3ad55486806f17cb6b445359d.tar.gz wekan-95f1772280d453c3ad55486806f17cb6b445359d.tar.bz2 wekan-95f1772280d453c3ad55486806f17cb6b445359d.zip |
linebreaker fixing
-rw-r--r-- | models/cards.js | 47 |
1 files changed, 23 insertions, 24 deletions
diff --git a/models/cards.js b/models/cards.js index 3eb4c69f..a48690bf 100644 --- a/models/cards.js +++ b/models/cards.js @@ -420,34 +420,33 @@ if (Meteor.isServer) { }); }); - JsonRoutes.add('PUT', '/api/boards/:boardId/lists/:listId/cards/:cardId', function (req, res, next) { - Authentication.checkUserId( req.userId); - const paramBoardId = req.params.boardId; - const paramCardId = req.params.cardId; - const paramListId = req.params.listId; - if(req.body.title !== undefined){ - const newTitle = req.body.title; - Cards.update({ _id: paramCardId, listId: paramListId, boardId: paramBoardId, archived: false }, + JsonRoutes.add('PUT', '/api/boards/:boardId/lists/:listId/cards/:cardId', function (req, res, next) { + Authentication.checkUserId( req.userId); + const paramBoardId = req.params.boardId; + const paramCardId = req.params.cardId; + const paramListId = req.params.listId; + if(req.body.title !== undefined){ + const newTitle = req.body.title; + Cards.update({ _id: paramCardId, listId: paramListId, boardId: paramBoardId, archived: false }, {$set:{title:newTitle}}); - } - if(req.body.listId !== undefined){ - const newParamListId = req.body.listId; - Cards.update({ _id: paramCardId, listId: paramListId, boardId: paramBoardId, archived: false }, + } + if(req.body.listId !== undefined){ + const newParamListId = req.body.listId; + Cards.update({ _id: paramCardId, listId: paramListId, boardId: paramBoardId, archived: false }, {$set:{listId:newParamListId}}); - } - if(req.body.description !== undefined){ - const newDescription = req.body.description; - Cards.update({ _id: paramCardId, listId: paramListId, boardId: paramBoardId, archived: false }, + } + if(req.body.description !== undefined){ + const newDescription = req.body.description; + Cards.update({ _id: paramCardId, listId: paramListId, boardId: paramBoardId, archived: false }, {$set:{description:newDescription}}); - } - JsonRoutes.sendResult(res, { - code: 200, - data: { - _id: paramCardId, - }, - }); + } + JsonRoutes.sendResult(res, { + code: 200, + data: { + _id: paramCardId, + }, }); - + }); JsonRoutes.add('DELETE', '/api/boards/:boardId/lists/:listId/cards/:cardId', function (req, res, next) { |