mirror of
https://github.com/wekan/wekan.git
synced 2026-01-05 17:18:49 +01:00
Move every Boards.find(idOrFirstObjectSelector, options) to the ReactiveCache (directory models/)
This commit is contained in:
parent
59ee616304
commit
f83ee124d0
5 changed files with 30 additions and 28 deletions
|
|
@ -245,7 +245,7 @@ function buildSelector(queryParams) {
|
|||
const boards = Boards.userSearch(userId, {
|
||||
title: new RegExp(escapeForRegex(query), 'i'),
|
||||
});
|
||||
if (boards.count()) {
|
||||
if (boards.length) {
|
||||
boards.forEach(board => {
|
||||
queryBoards.push(board._id);
|
||||
});
|
||||
|
|
@ -372,7 +372,7 @@ function buildSelector(queryParams) {
|
|||
labels: { $elemMatch: { color: label.toLowerCase() } },
|
||||
});
|
||||
|
||||
if (boards.count()) {
|
||||
if (boards.length) {
|
||||
boards.forEach(board => {
|
||||
// eslint-disable-next-line no-console
|
||||
// console.log('board:', board);
|
||||
|
|
@ -396,7 +396,7 @@ function buildSelector(queryParams) {
|
|||
labels: { $elemMatch: { name: reLabel } },
|
||||
});
|
||||
|
||||
if (boards.count()) {
|
||||
if (boards.length) {
|
||||
boards.forEach(board => {
|
||||
board.labels
|
||||
.filter(boardLabel => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue