mirror of
https://github.com/wekan/wekan.git
synced 2026-02-15 12:38:06 +01:00
Move every Swimlanes.findOne(idOrFirstObjectSelector, options) to the ReactiveCache
This commit is contained in:
parent
0767f50af8
commit
48ba81eb3d
6 changed files with 17 additions and 17 deletions
|
|
@ -783,7 +783,7 @@ Boards.helpers({
|
|||
},
|
||||
|
||||
nextSwimlane(swimlane) {
|
||||
return Swimlanes.findOne(
|
||||
return ReactiveCache.getSwimlane(
|
||||
{
|
||||
boardId: this._id,
|
||||
archived: false,
|
||||
|
|
@ -1193,13 +1193,13 @@ Boards.helpers({
|
|||
},
|
||||
|
||||
getDefaultSwimline() {
|
||||
let result = Swimlanes.findOne({ boardId: this._id });
|
||||
let result = ReactiveCache.getSwimlane({ boardId: this._id });
|
||||
if (result === undefined) {
|
||||
Swimlanes.insert({
|
||||
title: TAPi18n.__('default'),
|
||||
boardId: this._id,
|
||||
});
|
||||
result = Swimlanes.findOne({ boardId: this._id });
|
||||
result = ReactiveCache.getSwimlane({ boardId: this._id });
|
||||
}
|
||||
return result;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -437,7 +437,7 @@ if (Meteor.isServer) {
|
|||
|
||||
JsonRoutes.sendResult(res, {
|
||||
code: 200,
|
||||
data: Swimlanes.findOne({
|
||||
data: ReactiveCache.getSwimlane({
|
||||
_id: paramSwimlaneId,
|
||||
boardId: paramBoardId,
|
||||
archived: false,
|
||||
|
|
@ -501,7 +501,7 @@ if (Meteor.isServer) {
|
|||
const paramSwimlaneId = req.params.swimlaneId;
|
||||
Authentication.checkBoardAccess(req.userId, paramBoardId);
|
||||
const board = ReactiveCache.getBoard(paramBoardId);
|
||||
const swimlane = Swimlanes.findOne({
|
||||
const swimlane = ReactiveCache.getSwimlane({
|
||||
_id: paramSwimlaneId,
|
||||
boardId: paramBoardId,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue