Merge pull request #3495 from overleaf/ae-prettier-2

Upgrade Prettier to v2

GitOrigin-RevId: 85aa3fa1acb6332c4f58c46165a43d1a51471f33
This commit is contained in:
Alf Eaton
2021-04-14 14:17:21 +01:00
committed by Copybot
parent 930d7ba028
commit 1ebc8a79cb
582 changed files with 20382 additions and 20374 deletions
@@ -22,34 +22,36 @@ module.exports = ProjectDownloadsController = {
downloadProject(req, res, next) {
const project_id = req.params.Project_id
Metrics.inc('zip-downloads')
return DocumentUpdaterHandler.flushProjectToMongo(project_id, function(
error
) {
if (error != null) {
return next(error)
}
return ProjectGetter.getProject(project_id, { name: true }, function(
error,
project
) {
return DocumentUpdaterHandler.flushProjectToMongo(
project_id,
function (error) {
if (error != null) {
return next(error)
}
return ProjectZipStreamManager.createZipStreamForProject(
return ProjectGetter.getProject(
project_id,
function(error, stream) {
{ name: true },
function (error, project) {
if (error != null) {
return next(error)
}
res.setContentDisposition('attachment', {
filename: `${project.name}.zip`
})
res.contentType('application/zip')
return stream.pipe(res)
return ProjectZipStreamManager.createZipStreamForProject(
project_id,
function (error, stream) {
if (error != null) {
return next(error)
}
res.setContentDisposition('attachment', {
filename: `${project.name}.zip`
})
res.contentType('application/zip')
return stream.pipe(res)
}
)
}
)
})
})
}
)
},
downloadMultipleProjects(req, res, next) {
@@ -57,13 +59,13 @@ module.exports = ProjectDownloadsController = {
Metrics.inc('zip-downloads-multiple')
return DocumentUpdaterHandler.flushMultipleProjectsToMongo(
project_ids,
function(error) {
function (error) {
if (error != null) {
return next(error)
}
return ProjectZipStreamManager.createZipStreamForMultipleProjects(
project_ids,
function(error, stream) {
function (error, stream) {
if (error != null) {
return next(error)
}