mirror of
https://github.com/wekan/wekan.git
synced 2026-03-01 11:20:15 +01:00
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration: - Add await before all ReactiveCache.getX() calls - Make functions containing ReactiveCache calls async - Convert forEach/map/filter loops with async callbacks to for...of - Update model helpers, Meteor methods, JsonRoutes handlers - Update collection hooks (.before/.after insert/update/remove) - Update .allow() callbacks to async Files updated across models/ and server/ directories: - Model files: cards, boards, lists, swimlanes, activities, users, checklists, checklistItems, customFields, attachments, integrations, cardComments, settings files, creators, exporters, and more - Server files: publications, methods, notifications, routes, migrations
This commit is contained in:
parent
2f6e34c5f5
commit
71eb01e233
81 changed files with 2218 additions and 2148 deletions
|
|
@ -1,9 +1,9 @@
|
|||
Meteor.publish('user-miniprofile', function (usernames) {
|
||||
Meteor.publish('user-miniprofile', async function (usernames) {
|
||||
check(usernames, Array);
|
||||
|
||||
// eslint-disable-next-line no-console
|
||||
// console.log('usernames:', usernames);
|
||||
const ret = ReactiveCache.getUsers(
|
||||
const ret = await ReactiveCache.getUsers(
|
||||
{
|
||||
$or: [
|
||||
{ username: { $in: usernames } },
|
||||
|
|
@ -33,9 +33,9 @@ Meteor.publish('user-admin', function () {
|
|||
return ret;
|
||||
});
|
||||
|
||||
Meteor.publish('user-authenticationMethod', function (match) {
|
||||
Meteor.publish('user-authenticationMethod', async function (match) {
|
||||
check(match, String);
|
||||
const ret = ReactiveCache.getUsers(
|
||||
const ret = await ReactiveCache.getUsers(
|
||||
{ $or: [{ _id: match }, { email: match }, { username: match }] },
|
||||
{
|
||||
fields: {
|
||||
|
|
@ -50,7 +50,7 @@ Meteor.publish('user-authenticationMethod', function (match) {
|
|||
});
|
||||
|
||||
// Secure user search publication for board sharing
|
||||
Meteor.publish('user-search', function (searchTerm) {
|
||||
Meteor.publish('user-search', async function (searchTerm) {
|
||||
check(searchTerm, String);
|
||||
|
||||
// Only allow logged-in users to search for other users
|
||||
|
|
@ -62,7 +62,7 @@ Meteor.publish('user-search', function (searchTerm) {
|
|||
const searchRegex = new RegExp(searchTerm, 'i');
|
||||
|
||||
// Search for users by username, fullname, or email
|
||||
const ret = ReactiveCache.getUsers(
|
||||
const ret = await ReactiveCache.getUsers(
|
||||
{
|
||||
$or: [
|
||||
{ username: searchRegex },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue