mirror of
https://github.com/wekan/wekan.git
synced 2026-01-31 05:35:16 +01:00
Migrate accounts-lockout server files to async for Meteor 3.0
- lockedUsers.js: async getLockedUsers, unlockUser, unlockAllUsers - lockoutSettings.js: async reloadAccountsLockout with findOneAsync - accounts-lockout-config.js: async startup with findOneAsync - models/lockoutSettings.js: upsert → upsertAsync
This commit is contained in:
parent
65ce948bb0
commit
b431600d32
4 changed files with 29 additions and 29 deletions
|
|
@ -59,7 +59,7 @@ if (Meteor.isServer) {
|
|||
await LockoutSettings._collection.createIndexAsync({ modifiedAt: -1 });
|
||||
|
||||
// Known users settings
|
||||
LockoutSettings.upsert(
|
||||
await LockoutSettings.upsertAsync(
|
||||
{ _id: 'known-failuresBeforeLockout' },
|
||||
{
|
||||
$setOnInsert: {
|
||||
|
|
@ -71,7 +71,7 @@ if (Meteor.isServer) {
|
|||
},
|
||||
);
|
||||
|
||||
LockoutSettings.upsert(
|
||||
await LockoutSettings.upsertAsync(
|
||||
{ _id: 'known-lockoutPeriod' },
|
||||
{
|
||||
$setOnInsert: {
|
||||
|
|
@ -83,7 +83,7 @@ if (Meteor.isServer) {
|
|||
},
|
||||
);
|
||||
|
||||
LockoutSettings.upsert(
|
||||
await LockoutSettings.upsertAsync(
|
||||
{ _id: 'known-failureWindow' },
|
||||
{
|
||||
$setOnInsert: {
|
||||
|
|
@ -99,7 +99,7 @@ if (Meteor.isServer) {
|
|||
const typoVar = process.env.ACCOUNTS_LOCKOUT_UNKNOWN_USERS_FAILURES_BERORE;
|
||||
const correctVar = process.env.ACCOUNTS_LOCKOUT_UNKNOWN_USERS_FAILURES_BEFORE;
|
||||
|
||||
LockoutSettings.upsert(
|
||||
await LockoutSettings.upsertAsync(
|
||||
{ _id: 'unknown-failuresBeforeLockout' },
|
||||
{
|
||||
$setOnInsert: {
|
||||
|
|
@ -111,7 +111,7 @@ if (Meteor.isServer) {
|
|||
},
|
||||
);
|
||||
|
||||
LockoutSettings.upsert(
|
||||
await LockoutSettings.upsertAsync(
|
||||
{ _id: 'unknown-lockoutPeriod' },
|
||||
{
|
||||
$setOnInsert: {
|
||||
|
|
@ -123,7 +123,7 @@ if (Meteor.isServer) {
|
|||
},
|
||||
);
|
||||
|
||||
LockoutSettings.upsert(
|
||||
await LockoutSettings.upsertAsync(
|
||||
{ _id: 'unknown-failureWindow' },
|
||||
{
|
||||
$setOnInsert: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue