mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-23 14:01:52 +00:00
fix MockFileStoreApi to record uploaded files
This commit is contained in:
parent
68ac597a93
commit
69bed6dbb2
1 changed files with 5 additions and 2 deletions
|
@ -8,8 +8,11 @@ module.exports = MockFileStoreApi =
|
||||||
app.post "/project/:project_id/file/:file_id", (req, res, next) =>
|
app.post "/project/:project_id/file/:file_id", (req, res, next) =>
|
||||||
req.on 'data', ->
|
req.on 'data', ->
|
||||||
|
|
||||||
req.on 'end', ->
|
req.on 'end', =>
|
||||||
res.send 200
|
{project_id, file_id} = req.params
|
||||||
|
@files[project_id] ?= {}
|
||||||
|
@files[project_id][file_id] = { content : "test-file-content" }
|
||||||
|
res.sendStatus 200
|
||||||
|
|
||||||
app.listen 3009, (error) ->
|
app.listen 3009, (error) ->
|
||||||
throw error if error?
|
throw error if error?
|
||||||
|
|
Loading…
Reference in a new issue