mirror of
https://github.com/wekan/wekan.git
synced 2026-02-14 04:04:21 +01:00
Move every Boards.findOne(boardId) to the ReactiveCache (Part 2)
This commit is contained in:
parent
9022e9949f
commit
a182482cfb
37 changed files with 166 additions and 127 deletions
|
|
@ -2,6 +2,7 @@
|
|||
// non-archived boards:
|
||||
// 1. that the user is a member of
|
||||
// 2. the user has starred
|
||||
import { ReactiveCache } from '/imports/reactiveCache';
|
||||
import Users from "../../models/users";
|
||||
import Org from "../../models/org";
|
||||
import Team from "../../models/team";
|
||||
|
|
@ -326,7 +327,7 @@ Meteor.methods({
|
|||
check(boardId, String);
|
||||
check(properties, Object);
|
||||
|
||||
const board = Boards.findOne(boardId);
|
||||
const board = ReactiveCache.getBoard(boardId);
|
||||
if (board) {
|
||||
for (const key in properties) {
|
||||
board[key] = properties[key];
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
import { ReactiveCache } from '/imports/reactiveCache';
|
||||
|
||||
Meteor.methods({
|
||||
copySwimlane(swimlaneId, toBoardId) {
|
||||
check(swimlaneId, String);
|
||||
check(toBoardId, String);
|
||||
|
||||
const swimlane = Swimlanes.findOne(swimlaneId);
|
||||
const toBoard = Boards.findOne(toBoardId);
|
||||
const toBoard = ReactiveCache.getBoard(toBoardId);
|
||||
|
||||
if (swimlane && toBoard) {
|
||||
swimlane.copy(toBoardId);
|
||||
|
|
@ -19,7 +21,7 @@ Meteor.methods({
|
|||
check(toBoardId, String);
|
||||
|
||||
const swimlane = Swimlanes.findOne(swimlaneId);
|
||||
const toBoard = Boards.findOne(toBoardId);
|
||||
const toBoard = ReactiveCache.getBoard(toBoardId);
|
||||
|
||||
if (swimlane && toBoard) {
|
||||
swimlane.move(toBoardId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue