mirror of
https://github.com/wekan/wekan.git
synced 2026-02-18 22:18:07 +01:00
Migrate createIndex to createIndexAsync
This commit is contained in:
parent
60ecddfce4
commit
ca2083c858
32 changed files with 112 additions and 110 deletions
|
|
@ -55,9 +55,9 @@ if (Meteor.isServer) {
|
|||
function isAuthor(userId, doc, fieldNames = []) {
|
||||
return userId === doc.userId && fieldNames.indexOf('userId') === -1;
|
||||
}
|
||||
Meteor.startup(() => {
|
||||
UnsavedEditCollection._collection.createIndex({ modifiedAt: -1 });
|
||||
UnsavedEditCollection._collection.createIndex({ userId: 1 });
|
||||
Meteor.startup(async () => {
|
||||
await UnsavedEditCollection._collection.createIndexAsync({ modifiedAt: -1 });
|
||||
await UnsavedEditCollection._collection.createIndexAsync({ userId: 1 });
|
||||
});
|
||||
UnsavedEditCollection.allow({
|
||||
insert: isAuthor,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue