mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge branch 'master' of github.com:sharelatex/web-sharelatex
This commit is contained in:
commit
24c50189b6
4 changed files with 6 additions and 5 deletions
|
@ -123,7 +123,7 @@ module.exports = ProjectEntityHandler =
|
|||
doc = new Doc name: docName
|
||||
Project.putElement project._id, folder_id, doc, "doc", (err, result)=>
|
||||
return callback(err) if err?
|
||||
DocstoreManager.updateDoc project._id.toString(), doc._id.toString(), docLines, 0, (err, modified, rev) ->
|
||||
DocstoreManager.updateDoc project._id.toString(), doc._id.toString(), docLines, (err, modified, rev) ->
|
||||
return callback(err) if err?
|
||||
tpdsUpdateSender.addDoc {
|
||||
project_id: project._id,
|
||||
|
|
|
@ -41,7 +41,7 @@ app.configure ()->
|
|||
app.use express.static(__dirname + '/../../../public', {maxAge: staticCacheAge })
|
||||
app.set 'views', __dirname + '/../../views'
|
||||
app.set 'view engine', 'jade'
|
||||
app.use express.bodyParser(uploadDir: __dirname + "/../../../data/uploads")
|
||||
app.use express.bodyParser(uploadDir: Settings.path.uploadFolder)
|
||||
app.use cookieParser
|
||||
app.use express.session
|
||||
proxy: true
|
||||
|
|
|
@ -196,7 +196,8 @@ module.exports =
|
|||
# If we ever need to write something to disk (e.g. incoming requests
|
||||
# that need processing but may be too big for memory, then write
|
||||
# them to disk here).
|
||||
dumpFolder: Path.resolve "data/dumpFolder"
|
||||
dumpFolder: Path.resolve __dirname + "/../data/dumpFolder"
|
||||
uploadFolder: Path.resolve __dirname + "/../data/uploads"
|
||||
|
||||
# Automatic Snapshots
|
||||
# -------------------
|
||||
|
|
|
@ -305,7 +305,7 @@ describe 'ProjectEntityHandler', ->
|
|||
@ProjectModel.putElement = sinon.stub().callsArgWith(4, null, {path:{fileSystem:@path}})
|
||||
@callback = sinon.stub()
|
||||
@tpdsUpdateSender.addDoc = sinon.stub().callsArg(2)
|
||||
@DocstoreManager.updateDoc = sinon.stub().callsArgWith(4, null, true, 0)
|
||||
@DocstoreManager.updateDoc = sinon.stub().callsArgWith(3, null, true, 0)
|
||||
|
||||
@ProjectEntityHandler.addDoc project_id, folder_id, @name, @lines, @callback
|
||||
|
||||
|
@ -335,7 +335,7 @@ describe 'ProjectEntityHandler', ->
|
|||
|
||||
it "should send the doc lines to the doc store", ->
|
||||
@DocstoreManager.updateDoc
|
||||
.calledWith(project_id, @doc._id.toString(), @lines, 0)
|
||||
.calledWith(project_id, @doc._id.toString(), @lines)
|
||||
.should.equal true
|
||||
|
||||
describe 'adding file', ->
|
||||
|
|
Loading…
Reference in a new issue