mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
Merge pull request #5087 from overleaf/em-promisify-subscription-updater
Promisify FeaturesUpdater and SubscriptionHandler GitOrigin-RevId: 1a9725afa119c0eaee3d975a11197b6f702f1307
This commit is contained in:
@@ -3,6 +3,7 @@ const minimist = require('minimist')
|
||||
const _ = require('lodash')
|
||||
const async = require('async')
|
||||
const FeaturesUpdater = require('../app/src/Features/Subscription/FeaturesUpdater')
|
||||
const FeaturesHelper = require('../app/src/Features/Subscription/FeaturesHelper')
|
||||
const UserFeaturesUpdater = require('../app/src/Features/Subscription/UserFeaturesUpdater')
|
||||
|
||||
const ScriptLogger = {
|
||||
@@ -54,12 +55,12 @@ const ScriptLogger = {
|
||||
}
|
||||
|
||||
const checkAndUpdateUser = (user, callback) =>
|
||||
FeaturesUpdater._computeFeatures(user._id, (error, freshFeatures) => {
|
||||
FeaturesUpdater.computeFeatures(user._id, (error, freshFeatures) => {
|
||||
if (error) {
|
||||
return callback(error)
|
||||
}
|
||||
|
||||
const mismatchReasons = FeaturesUpdater.compareFeatures(
|
||||
const mismatchReasons = FeaturesHelper.compareFeatures(
|
||||
user.features,
|
||||
freshFeatures
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user