mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
Move every Integrations.find(idOrFirstObjectSelector, options) to the ReactiveCache (directory models/)
This commit is contained in:
parent
26e326a204
commit
ea72ce1fa2
2 changed files with 3 additions and 3 deletions
|
@ -334,12 +334,12 @@ if (Meteor.isServer) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const integrations = Integrations.find({
|
const integrations = ReactiveCache.getIntegrations({
|
||||||
boardId: { $in: [board._id, Integrations.Const.GLOBAL_WEBHOOK_ID] },
|
boardId: { $in: [board._id, Integrations.Const.GLOBAL_WEBHOOK_ID] },
|
||||||
// type: 'outgoing-webhooks', // all types
|
// type: 'outgoing-webhooks', // all types
|
||||||
enabled: true,
|
enabled: true,
|
||||||
activities: { $in: [description, 'all'] },
|
activities: { $in: [description, 'all'] },
|
||||||
}).fetch();
|
});
|
||||||
if (integrations.length > 0) {
|
if (integrations.length > 0) {
|
||||||
params.watchers = watchers;
|
params.watchers = watchers;
|
||||||
integrations.forEach(integration => {
|
integrations.forEach(integration => {
|
||||||
|
|
|
@ -142,7 +142,7 @@ if (Meteor.isServer) {
|
||||||
const paramBoardId = req.params.boardId;
|
const paramBoardId = req.params.boardId;
|
||||||
Authentication.checkBoardAccess(req.userId, paramBoardId);
|
Authentication.checkBoardAccess(req.userId, paramBoardId);
|
||||||
|
|
||||||
const data = Integrations.find(
|
const data = ReactiveCache.getIntegrations(
|
||||||
{ boardId: paramBoardId },
|
{ boardId: paramBoardId },
|
||||||
{ fields: { token: 0 } },
|
{ fields: { token: 0 } },
|
||||||
).map(function(doc) {
|
).map(function(doc) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue