fixed badly called flushProjectToThirdPartyDataStore causing issues with initial drobox sync

This commit is contained in:
Henry Oswald 2014-10-31 12:41:06 +00:00
parent aeb956c8a4
commit 30100f2a07
3 changed files with 3 additions and 3 deletions

View file

@ -150,7 +150,7 @@ module.exports = EditorController =
callback null, false
else
CollaboratorsHandler.addUserToProject project_id, email, privileges, (err, user)=>
ProjectEntityHandler.flushProjectToThirdPartyDataStore project_id, "", ->
ProjectEntityHandler.flushProjectToThirdPartyDataStore project_id, ->
EditorRealTimeController.emitToRoom(project_id, 'userAddedToProject', user, privileges)
callback null, ProjectEditorHandler.buildUserModelView(user, privileges)

View file

@ -72,7 +72,7 @@ module.exports = ProjectEntityHandler =
self = @
logger.log project_id:project_id, "flushing project to tpds"
documentUpdaterHandler = require('../../Features/DocumentUpdater/DocumentUpdaterHandler')
documentUpdaterHandler.flushProjectToMongo project_id, undefined, (error) ->
documentUpdaterHandler.flushProjectToMongo project_id, (error) ->
return callback(error) if error?
Project.findById project_id, (error, project) ->
return callback(error) if error?

View file

@ -785,7 +785,7 @@ describe 'ProjectEntityHandler', ->
name: "Mock project name"
}
@ProjectModel.findById = sinon.stub().callsArgWith(1, null, @project)
@documentUpdaterHandler.flushProjectToMongo = sinon.stub().callsArg(2)
@documentUpdaterHandler.flushProjectToMongo = sinon.stub().callsArg(1)
@tpdsUpdateSender.addDoc = sinon.stub().callsArg(1)
@tpdsUpdateSender.addFile = sinon.stub().callsArg(1)
@docs = {