mirror of
https://github.com/wekan/wekan.git
synced 2026-02-20 23:14:07 +01:00
Fix bugs
This commit is contained in:
parent
71eb01e233
commit
0f4ff6e30e
2 changed files with 8 additions and 7 deletions
|
|
@ -660,14 +660,14 @@ if (Meteor.isServer) {
|
|||
* @return_type [{_id: string,
|
||||
* title: string}]
|
||||
*/
|
||||
JsonRoutes.add('GET', '/api/boards/:boardId/lists', function(req, res) {
|
||||
JsonRoutes.add('GET', '/api/boards/:boardId/lists', async function(req, res) {
|
||||
try {
|
||||
const paramBoardId = req.params.boardId;
|
||||
Authentication.checkBoardAccess(req.userId, paramBoardId);
|
||||
|
||||
JsonRoutes.sendResult(res, {
|
||||
code: 200,
|
||||
data: ReactiveCache.getLists({ boardId: paramBoardId, archived: false }).map(
|
||||
data: (await ReactiveCache.getLists({ boardId: paramBoardId, archived: false })).map(
|
||||
function(doc) {
|
||||
return {
|
||||
_id: doc._id,
|
||||
|
|
@ -692,7 +692,7 @@ if (Meteor.isServer) {
|
|||
* @param {string} listId the List ID
|
||||
* @return_type Lists
|
||||
*/
|
||||
JsonRoutes.add('GET', '/api/boards/:boardId/lists/:listId', function(
|
||||
JsonRoutes.add('GET', '/api/boards/:boardId/lists/:listId', async function(
|
||||
req,
|
||||
res,
|
||||
) {
|
||||
|
|
@ -702,7 +702,7 @@ if (Meteor.isServer) {
|
|||
Authentication.checkBoardAccess(req.userId, paramBoardId);
|
||||
JsonRoutes.sendResult(res, {
|
||||
code: 200,
|
||||
data: ReactiveCache.getList({
|
||||
data: await ReactiveCache.getList({
|
||||
_id: paramListId,
|
||||
boardId: paramBoardId,
|
||||
archived: false,
|
||||
|
|
|
|||
|
|
@ -35,15 +35,16 @@ Meteor.publish('activities', async function(kind, id, limit, showActivities) {
|
|||
}
|
||||
|
||||
// Get linked boards, but only those visible to the user
|
||||
(await ReactiveCache.getCards({
|
||||
const linkedCards = await ReactiveCache.getCards({
|
||||
"type": "cardType-linkedBoard",
|
||||
"boardId": id
|
||||
})).forEach(async card => {
|
||||
});
|
||||
for (const card of linkedCards) {
|
||||
const linkedBoard = await ReactiveCache.getBoard(card.linkedId);
|
||||
if (linkedBoard && linkedBoard.isVisibleBy(this.userId)) {
|
||||
linkedElmtId.push(card.linkedId);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if (kind === 'card') {
|
||||
const card = await ReactiveCache.getCard(id);
|
||||
if (!card) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue