diff --git a/services/web/app/coffee/Features/Project/ProjectController.coffee b/services/web/app/coffee/Features/Project/ProjectController.coffee index d447ffc547..3c6264ecd6 100644 --- a/services/web/app/coffee/Features/Project/ProjectController.coffee +++ b/services/web/app/coffee/Features/Project/ProjectController.coffee @@ -193,8 +193,10 @@ module.exports = ProjectController = SubscriptionLocator.getUsersSubscription user_id, cb activate: (cb)-> InactiveProjectManager.reactivateProjectIfRequired project_id, cb - markOpened: (cb)-> - ProjectUpdateHandler.markOpened project_id, cb + markAsOpened: (cb)-> + #don't need to wait for this to complete + ProjectUpdateHandler.markAsOpened project_id, -> + cb() }, (err, results)-> if err? logger.err err:err, "error getting details for project page" diff --git a/services/web/test/UnitTests/coffee/Project/ProjectControllerTests.coffee b/services/web/test/UnitTests/coffee/Project/ProjectControllerTests.coffee index 1db3e50aad..d95dbb97b9 100644 --- a/services/web/test/UnitTests/coffee/Project/ProjectControllerTests.coffee +++ b/services/web/test/UnitTests/coffee/Project/ProjectControllerTests.coffee @@ -45,7 +45,7 @@ describe "ProjectController", -> @InactiveProjectManager = reactivateProjectIfRequired:sinon.stub() @ProjectUpdateHandler = - markOpened: sinon.stub() + markAsOpened: sinon.stub() @ProjectController = SandboxedModule.require modulePath, requires: "settings-sharelatex":@settings "logger-sharelatex": @@ -289,7 +289,7 @@ describe "ProjectController", -> @SecurityManager.userCanAccessProject.callsArgWith 2, true, "owner" @ProjectDeleter.unmarkAsDeletedByExternalSource = sinon.stub() @InactiveProjectManager.reactivateProjectIfRequired.callsArgWith(1) - @ProjectUpdateHandler.markOpened.callsArgWith(1) + @ProjectUpdateHandler.markAsOpened.callsArgWith(1) it "should render the project/editor page", (done)-> @@ -339,7 +339,7 @@ describe "ProjectController", -> it "should mark project as opened", (done)-> @res.render = (pageName, opts)=> - @ProjectUpdateHandler.markOpened.calledWith(@project_id).should.equal true + @ProjectUpdateHandler.markAsOpened.calledWith(@project_id).should.equal true done() @ProjectController.loadEditor @req, @res