mirror of
https://github.com/wekan/wekan.git
synced 2025-04-23 21:47:10 -04: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] },
|
||||
// type: 'outgoing-webhooks', // all types
|
||||
enabled: true,
|
||||
activities: { $in: [description, 'all'] },
|
||||
}).fetch();
|
||||
});
|
||||
if (integrations.length > 0) {
|
||||
params.watchers = watchers;
|
||||
integrations.forEach(integration => {
|
||||
|
|
|
@ -142,7 +142,7 @@ if (Meteor.isServer) {
|
|||
const paramBoardId = req.params.boardId;
|
||||
Authentication.checkBoardAccess(req.userId, paramBoardId);
|
||||
|
||||
const data = Integrations.find(
|
||||
const data = ReactiveCache.getIntegrations(
|
||||
{ boardId: paramBoardId },
|
||||
{ fields: { token: 0 } },
|
||||
).map(function(doc) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue