mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
remove if statments checking if s3 is a backend
if its not enable then it can crash. In prod it should always be there or not used at all
This commit is contained in:
@@ -27,9 +27,8 @@ app.post "/project/:project_id/doc/:doc_id/version/:version/restore", HttpContro
|
||||
|
||||
app.post "/doc/:doc_id/pack", HttpController.packDoc
|
||||
|
||||
if Settings.filestore?.backend == "s3"
|
||||
app.get '/project/:project_id/archive', HttpController.archiveProject
|
||||
app.get '/project/:project_id/unarchive', HttpController.unArchiveProject
|
||||
app.get '/project/:project_id/archive', HttpController.archiveProject
|
||||
app.get '/project/:project_id/unarchive', HttpController.unArchiveProject
|
||||
|
||||
packWorker = null # use a single packing worker
|
||||
|
||||
|
||||
@@ -10,8 +10,6 @@ settings = require("settings-sharelatex")
|
||||
module.exports = DocArchiveManager =
|
||||
|
||||
archiveAllDocsChanges: (project_id, callback = (error, docs) ->) ->
|
||||
if settings.filestore?.backend != "s3"
|
||||
return callback(null)
|
||||
DocstoreHandler.getAllDocs project_id, (error, docs) ->
|
||||
if error?
|
||||
return callback(error)
|
||||
@@ -42,8 +40,6 @@ module.exports = DocArchiveManager =
|
||||
callback()
|
||||
|
||||
unArchiveAllDocsChanges: (project_id, callback = (error, docs) ->) ->
|
||||
if settings.filestore?.backend != "s3"
|
||||
return callback(null)
|
||||
DocstoreHandler.getAllDocs project_id, (error, docs) ->
|
||||
if error?
|
||||
return callback(error)
|
||||
|
||||
Reference in New Issue
Block a user