diff options
author | Lauri Ojansivu <x@xet7.org> | 2018-10-10 00:49:07 +0300 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2018-10-10 00:49:07 +0300 |
commit | 1dda8bff5e659c80216a2128e81446d9815dd7f5 (patch) | |
tree | b5dfe629ed8a714dd22d6f0b4c5860f420dd4570 | |
parent | f11c8727d9cb013d05f3674c807cc8c353a2bbd8 (diff) | |
parent | 1db6efa9c875662bdcdac09bca94067ac88a21b7 (diff) | |
download | wekan-1dda8bff5e659c80216a2128e81446d9815dd7f5.tar.gz wekan-1dda8bff5e659c80216a2128e81446d9815dd7f5.tar.bz2 wekan-1dda8bff5e659c80216a2128e81446d9815dd7f5.zip |
Merge branch 'dcmcand-dcmcand-dev' into edge
-rw-r--r-- | CHANGELOG.md | 7 | ||||
-rw-r--r-- | models/cards.js | 23 |
2 files changed, 27 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index b20c311f..6a546e79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,10 @@ This release adds the following new features: -- [LDAP](https://github.com/wekan/wekan/commit/288800eafc91d07f859c4f59588e0b646137ccb9). In progress. +- [LDAP](https://github.com/wekan/wekan/commit/288800eafc91d07f859c4f59588e0b646137ccb9). Please test and [add info about bugs](https://github.com/wekan/wekan/issues/119); -- [Add LDAP support and authentications dropdown menu on login page](https://github.com/wekan/wekan/pull/1943). +- [Add LDAP support and authentications dropdown menu on login page](https://github.com/wekan/wekan/pull/1943); +- [REST API: Get cards by swimlane id](https://github.com/wekan/wekan/pull/1944). Please [add docs](https://github.com/wekan/wekan/wiki/REST-API-Swimlanes). and fixes the following bugs: @@ -13,7 +14,7 @@ and fixes the following bugs: - [Add info about root-url to GitHub issue template](https://github.com/wekan/wekan/commit/4c0eb7dcc19ca9ae8c5d2d0276e0d024269de236); - [Feature rules: fixes and enhancements](https://github.com/wekan/wekan/pull/1936). -Thanks to GitHub users Akuket, Angtrim, lberk, maximest-pierre, InfoSec812, schulz and xet7 for their contributions. +Thanks to GitHub users Akuket, Angtrim, dcmcand, lberk, maximest-pierre, InfoSec812, schulz and xet7 for their contributions. # v1.52.1 2018-10-02 Wekan Edge release diff --git a/models/cards.js b/models/cards.js index 66bfbcf3..25692c25 100644 --- a/models/cards.js +++ b/models/cards.js @@ -1304,6 +1304,29 @@ if (Meteor.isServer) { cardRemover(userId, doc); }); } +//SWIMLANES REST API +if (Meteor.isServer) { + JsonRoutes.add('GET', '/api/boards/:boardId/swimlanes/:swimlaneId/cards', function(req, res) { + const paramBoardId = req.params.boardId; + const paramSwimlaneId = req.params.swimlaneId; + Authentication.checkBoardAccess(req.userId, paramBoardId); + JsonRoutes.sendResult(res, { + code: 200, + data: Cards.find({ + boardId: paramBoardId, + swimlaneId: paramSwimlaneId, + archived: false, + }).map(function(doc) { + return { + _id: doc._id, + title: doc.title, + description: doc.description, + listId: doc.listId, + }; + }), + }); + }); +} //LISTS REST API if (Meteor.isServer) { JsonRoutes.add('GET', '/api/boards/:boardId/lists/:listId/cards', function(req, res) { |