mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-25 19:34:04 +00:00
Only parse body when we need to for copyFile request
This commit is contained in:
parent
bc6c8d6afc
commit
8ddfbb99de
1 changed files with 2 additions and 3 deletions
|
@ -17,7 +17,6 @@ Metrics.event_loop?.monitor(logger)
|
|||
Metrics.memory.monitor(logger)
|
||||
|
||||
app.configure ->
|
||||
app.use express.bodyParser()
|
||||
app.use Metrics.http.monitor(logger)
|
||||
|
||||
app.configure 'development', ->
|
||||
|
@ -72,7 +71,7 @@ app.use (req, res, next) ->
|
|||
app.get "/project/:project_id/file/:file_id", keyBuilder.userFileKey, fileController.getFile
|
||||
app.post "/project/:project_id/file/:file_id", keyBuilder.userFileKey, fileController.insertFile
|
||||
|
||||
app.put "/project/:project_id/file/:file_id", keyBuilder.userFileKey, fileController.copyFile
|
||||
app.put "/project/:project_id/file/:file_id", keyBuilder.userFileKey, express.bodyParser(), fileController.copyFile
|
||||
app.del "/project/:project_id/file/:file_id", keyBuilder.userFileKey, fileController.deleteFile
|
||||
|
||||
app.get "/template/:template_id/v/:version/:format", keyBuilder.templateFileKey, fileController.getFile
|
||||
|
@ -83,7 +82,7 @@ app.post "/template/:template_id/v/:version/:format", keyBuilder.templateFileKey
|
|||
app.get "/project/:project_id/public/:public_file_id", keyBuilder.publicFileKey, fileController.getFile
|
||||
app.post "/project/:project_id/public/:public_file_id", keyBuilder.publicFileKey, fileController.insertFile
|
||||
|
||||
app.put "/project/:project_id/public/:public_file_id", keyBuilder.publicFileKey, fileController.copyFile
|
||||
app.put "/project/:project_id/public/:public_file_id", keyBuilder.publicFileKey, express.bodyParser(), fileController.copyFile
|
||||
app.del "/project/:project_id/public/:public_file_id", keyBuilder.publicFileKey, fileController.deleteFile
|
||||
|
||||
app.get "/heapdump", (req, res)->
|
||||
|
|
Loading…
Reference in a new issue