Migrate createIndex to createIndexAsync

This commit is contained in:
Harry Adel 2026-01-24 01:55:29 +02:00
parent 60ecddfce4
commit ca2083c858
32 changed files with 112 additions and 110 deletions

View file

@ -2895,11 +2895,11 @@ const addCronJob = _.debounce(
if (Meteor.isServer) {
// Let mongoDB ensure username unicity
Meteor.startup(() => {
allowedSortValues.forEach((value) => {
Lists._collection.createIndex(value);
});
Users._collection.createIndex({
Meteor.startup(async () => {
for (const value of allowedSortValues) {
await Lists._collection.createIndexAsync(value);
}
await Users._collection.createIndexAsync({
modifiedAt: -1,
});
// Avatar URLs from CollectionFS to Meteor-Files, at users collection avatarUrl field: