From 31bc0c640b2e701a82178e1942a66b16232c6433 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Mon, 13 Jan 2020 13:54:17 +0000 Subject: [PATCH] Merge pull request #2514 from overleaf/revert-2504-bg-initialise-history-on-open Revert "create v2 history for old projects when opened" GitOrigin-RevId: 81c613e82872a0938c5621e3108b2457935468f1 --- .../app/src/Features/Project/ProjectController.js | 4 ---- .../unit/src/Project/ProjectControllerTests.js | 14 -------------- 2 files changed, 18 deletions(-) diff --git a/services/web/app/src/Features/Project/ProjectController.js b/services/web/app/src/Features/Project/ProjectController.js index e4baca6ec0..6afa5ca0ee 100644 --- a/services/web/app/src/Features/Project/ProjectController.js +++ b/services/web/app/src/Features/Project/ProjectController.js @@ -6,7 +6,6 @@ const logger = require('logger-sharelatex') const ProjectDeleter = require('./ProjectDeleter') const ProjectDuplicator = require('./ProjectDuplicator') const ProjectCreationHandler = require('./ProjectCreationHandler') -const ProjectHistoryHandler = require('./ProjectHistoryHandler') const EditorController = require('../Editor/EditorController') const ProjectHelper = require('./ProjectHelper') const metrics = require('metrics-sharelatex') @@ -700,9 +699,6 @@ const ProjectController = { activate(cb) { InactiveProjectManager.reactivateProjectIfRequired(projectId, cb) }, - ensureHistoryExists(cb) { - ProjectHistoryHandler.ensureHistoryExistsForProject(projectId, cb) - }, markAsOpened(cb) { // don't need to wait for this to complete ProjectUpdateHandler.markAsOpened(projectId, () => {}) diff --git a/services/web/test/unit/src/Project/ProjectControllerTests.js b/services/web/test/unit/src/Project/ProjectControllerTests.js index c986b9029b..ff4a760e65 100644 --- a/services/web/test/unit/src/Project/ProjectControllerTests.js +++ b/services/web/test/unit/src/Project/ProjectControllerTests.js @@ -56,9 +56,6 @@ describe('ProjectController', function() { .stub() .callsArgWith(2, null, { _id: this.project_id }) } - this.ProjectHistoryHandler = { - ensureHistoryExistsForProject: sinon.stub().callsArg(1) - } this.SubscriptionLocator = { getUsersSubscription: sinon.stub() } this.LimitationsManager = { hasPaidSubscription: sinon.stub() } this.TagsHandler = { getAllTags: sinon.stub() } @@ -160,7 +157,6 @@ describe('ProjectController', function() { './ProjectDeleter': this.ProjectDeleter, './ProjectDuplicator': this.ProjectDuplicator, './ProjectCreationHandler': this.ProjectCreationHandler, - './ProjectHistoryHandler': this.ProjectHistoryHandler, '../Editor/EditorController': this.EditorController, '../User/UserController': this.UserController, './ProjectHelper': this.ProjectHelper, @@ -1137,16 +1133,6 @@ describe('ProjectController', function() { this.ProjectController.loadEditor(this.req, this.res) }) - it('should ensureHistoryExistsForProject', function(done) { - this.res.render = (pageName, opts) => { - this.ProjectHistoryHandler.ensureHistoryExistsForProject - .calledWith(this.project_id) - .should.equal(true) - done() - } - this.ProjectController.loadEditor(this.req, this.res) - }) - it('should mark project as opened', function(done) { this.res.render = (pageName, opts) => { this.ProjectUpdateHandler.markAsOpened