mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Merge pull request #7767 from overleaf/em-relax-unarchive-docs
Allow concurrent doc unarchive operations GitOrigin-RevId: 7edd1bd764125a0dc8e4a5fec643558a56e20f30
This commit is contained in:
@@ -249,12 +249,13 @@ function archiveDoc(req, res, next) {
|
||||
function unArchiveAllDocs(req, res, next) {
|
||||
const { project_id: projectId } = req.params
|
||||
logger.log({ projectId }, 'unarchiving all docs')
|
||||
DocArchive.unArchiveAllDocs(projectId, function (error) {
|
||||
if (error) {
|
||||
if (error instanceof Errors.DocRevValueError) {
|
||||
DocArchive.unArchiveAllDocs(projectId, function (err) {
|
||||
if (err) {
|
||||
if (err instanceof Errors.DocRevValueError) {
|
||||
logger.warn({ err }, 'Failed to unarchive doc')
|
||||
return res.sendStatus(409)
|
||||
}
|
||||
return next(error)
|
||||
return next(err)
|
||||
}
|
||||
res.sendStatus(200)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user