mirror of
https://github.com/wekan/wekan.git
synced 2026-03-08 06:32:34 +01:00
Add route to get cards by swimlaneid
This commit is contained in:
parent
4c6c6ffb16
commit
be42b8d4cb
1 changed files with 23 additions and 0 deletions
|
|
@ -1304,6 +1304,29 @@ if (Meteor.isServer) {
|
||||||
cardRemover(userId, doc);
|
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
|
//LISTS REST API
|
||||||
if (Meteor.isServer) {
|
if (Meteor.isServer) {
|
||||||
JsonRoutes.add('GET', '/api/boards/:boardId/lists/:listId/cards', function(req, res) {
|
JsonRoutes.add('GET', '/api/boards/:boardId/lists/:listId/cards', function(req, res) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue