Fix a problem with the order of module initialization

This commit is contained in:
Shane Kilkelly 2017-12-07 15:06:32 +00:00
parent a1f1c25294
commit 4e86a03b46

View file

@ -8,7 +8,6 @@ Settings = require("settings-sharelatex")
logger = require("logger-sharelatex")
ObjectId = require('mongoose').Types.ObjectId
ReferalAllocator = require("../Referal/ReferalAllocator")
Modules = require '../../infrastructure/Modules'
oneMonthInSeconds = 60 * 60 * 24 * 30
@ -108,6 +107,7 @@ module.exports = SubscriptionUpdater =
groupSubscription: (cb)->
SubscriptionLocator.getGroupSubscriptionMemberOf user_id, cb
overleafPlanCode: (cb) ->
Modules = require '../../infrastructure/Modules'
Modules.hooks.fire 'getOverleafPlanCode', user_id, cb
async.series jobs, (err, results)->
if err?