mirror of
https://github.com/wekan/wekan.git
synced 2026-01-24 02:06:10 +01:00
Move every Users.find(idOrFirstObjectSelector, options) to the ReactiveCache (directory server/)
This commit is contained in:
parent
46840c9373
commit
6646b8638e
5 changed files with 23 additions and 15 deletions
|
|
@ -3,7 +3,7 @@ Meteor.publish('user-miniprofile', function (usernames) {
|
|||
|
||||
// eslint-disable-next-line no-console
|
||||
// console.log('usernames:', usernames);
|
||||
const ret = Users.find(
|
||||
const ret = ReactiveCache.getUsers(
|
||||
{
|
||||
$or: [
|
||||
{ username: { $in: usernames } },
|
||||
|
|
@ -16,6 +16,7 @@ Meteor.publish('user-miniprofile', function (usernames) {
|
|||
importUsernames: 1,
|
||||
},
|
||||
},
|
||||
true,
|
||||
);
|
||||
return ret;
|
||||
});
|
||||
|
|
@ -34,7 +35,7 @@ Meteor.publish('user-admin', function () {
|
|||
|
||||
Meteor.publish('user-authenticationMethod', function (match) {
|
||||
check(match, String);
|
||||
const ret = Users.find(
|
||||
const ret = ReactiveCache.getUsers(
|
||||
{ $or: [{ _id: match }, { email: match }, { username: match }] },
|
||||
{
|
||||
fields: {
|
||||
|
|
@ -43,6 +44,7 @@ Meteor.publish('user-authenticationMethod', function (match) {
|
|||
orgs: 1,
|
||||
},
|
||||
},
|
||||
true,
|
||||
);
|
||||
return ret;
|
||||
});
|
||||
|
|
@ -100,9 +102,9 @@ I20221023-09:15:09.602(3)? at packages/ddp-server/livedata_server.js:1496:18
|
|||
// console.log('connection.Id on close...', connection.id);
|
||||
// // Get all user that were connected to this socket
|
||||
// // And update last connection date and last connection average time (in seconds) for each user
|
||||
// let lstOfUserThatWasConnectedToThisSocket = Users.find({
|
||||
// let lstOfUserThatWasConnectedToThisSocket = ReactiveCache.getUsers({
|
||||
// lastconnectedSocketId: connection.id,
|
||||
// }).fetch();
|
||||
// }, {}, true).fetch();
|
||||
// if (
|
||||
// lstOfUserThatWasConnectedToThisSocket !== undefined &&
|
||||
// lstOfUserThatWasConnectedToThisSocket.length > 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue