Merge pull request #4657 from overleaf/jel-check-uni-users

Remove await use since no async

GitOrigin-RevId: 43cb8be365bedd95d004ab9e129c75aeab855e53
This commit is contained in:
June Kelly 2021-08-11 09:50:14 +01:00 committed by Copybot
parent 4737982cdd
commit f181328db0

View file

@ -55,11 +55,7 @@ async function _checkUsersFeatures(userIds) {
nonProUserIds: [],
}
await new Promise((resolve, reject) => {
async.eachLimit(
users,
ASYNC_LIMIT,
(user, callback) => {
users.forEach(user => {
const hasProFeaturesOrBetter = FeaturesUpdater.isFeatureSetBetter(
user.features,
Settings.features.professional
@ -70,14 +66,8 @@ async function _checkUsersFeatures(userIds) {
} else {
result.nonProUserIds.push(user._id)
}
callback()
},
error => {
if (error) return reject(error)
resolve()
}
)
})
return result
}