mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
linebreaker fixing
This commit is contained in:
parent
3a99eb9c9f
commit
95f1772280
1 changed files with 23 additions and 24 deletions
|
|
@ -420,34 +420,33 @@ if (Meteor.isServer) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
JsonRoutes.add('PUT', '/api/boards/:boardId/lists/:listId/cards/:cardId', function (req, res, next) {
|
JsonRoutes.add('PUT', '/api/boards/:boardId/lists/:listId/cards/:cardId', function (req, res, next) {
|
||||||
Authentication.checkUserId( req.userId);
|
Authentication.checkUserId( req.userId);
|
||||||
const paramBoardId = req.params.boardId;
|
const paramBoardId = req.params.boardId;
|
||||||
const paramCardId = req.params.cardId;
|
const paramCardId = req.params.cardId;
|
||||||
const paramListId = req.params.listId;
|
const paramListId = req.params.listId;
|
||||||
if(req.body.title !== undefined){
|
if(req.body.title !== undefined){
|
||||||
const newTitle = req.body.title;
|
const newTitle = req.body.title;
|
||||||
Cards.update({ _id: paramCardId, listId: paramListId, boardId: paramBoardId, archived: false },
|
Cards.update({ _id: paramCardId, listId: paramListId, boardId: paramBoardId, archived: false },
|
||||||
{$set:{title:newTitle}});
|
{$set:{title:newTitle}});
|
||||||
}
|
}
|
||||||
if(req.body.listId !== undefined){
|
if(req.body.listId !== undefined){
|
||||||
const newParamListId = req.body.listId;
|
const newParamListId = req.body.listId;
|
||||||
Cards.update({ _id: paramCardId, listId: paramListId, boardId: paramBoardId, archived: false },
|
Cards.update({ _id: paramCardId, listId: paramListId, boardId: paramBoardId, archived: false },
|
||||||
{$set:{listId:newParamListId}});
|
{$set:{listId:newParamListId}});
|
||||||
}
|
}
|
||||||
if(req.body.description !== undefined){
|
if(req.body.description !== undefined){
|
||||||
const newDescription = req.body.description;
|
const newDescription = req.body.description;
|
||||||
Cards.update({ _id: paramCardId, listId: paramListId, boardId: paramBoardId, archived: false },
|
Cards.update({ _id: paramCardId, listId: paramListId, boardId: paramBoardId, archived: false },
|
||||||
{$set:{description:newDescription}});
|
{$set:{description:newDescription}});
|
||||||
}
|
}
|
||||||
JsonRoutes.sendResult(res, {
|
JsonRoutes.sendResult(res, {
|
||||||
code: 200,
|
code: 200,
|
||||||
data: {
|
data: {
|
||||||
_id: paramCardId,
|
_id: paramCardId,
|
||||||
},
|
},
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
JsonRoutes.add('DELETE', '/api/boards/:boardId/lists/:listId/cards/:cardId', function (req, res, next) {
|
JsonRoutes.add('DELETE', '/api/boards/:boardId/lists/:listId/cards/:cardId', function (req, res, next) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue