fix MockFileStoreApi to record uploaded files

This commit is contained in:
Brian Gough 2018-01-25 16:58:48 +00:00
parent 68ac597a93
commit 69bed6dbb2

View file

@ -8,8 +8,11 @@ module.exports = MockFileStoreApi =
app.post "/project/:project_id/file/:file_id", (req, res, next) =>
req.on 'data', ->
req.on 'end', ->
res.send 200
req.on 'end', =>
{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) ->
throw error if error?