mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-11 07:00:47 +02:00
Merge pull request #2118 from overleaf/cmg-convert-array-archiving
New archiving endpoint to convert to array GitOrigin-RevId: a6f5d3e2363afcbcd5719731261b85a0ae7a1e25
This commit is contained in:
committed by
sharelatex
parent
86d844baf2
commit
b5f4e26840
@@ -143,10 +143,40 @@ const ProjectController = {
|
||||
cb
|
||||
)
|
||||
} else {
|
||||
ProjectDeleter.archiveProject(projectId, cb)
|
||||
ProjectDeleter.legacyArchiveProject(projectId, cb)
|
||||
}
|
||||
},
|
||||
|
||||
archiveProject(req, res, next) {
|
||||
const projectId = req.params.Project_id
|
||||
logger.log({ projectId }, 'received request to archive project')
|
||||
|
||||
const user = AuthenticationController.getSessionUser(req)
|
||||
|
||||
ProjectDeleter.archiveProject(projectId, user._id, function(err) {
|
||||
if (err != null) {
|
||||
return next(err)
|
||||
} else {
|
||||
return res.sendStatus(200)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
unarchiveProject(req, res, next) {
|
||||
const projectId = req.params.Project_id
|
||||
logger.log({ projectId }, 'received request to unarchive project')
|
||||
|
||||
const user = AuthenticationController.getSessionUser(req)
|
||||
|
||||
ProjectDeleter.unarchiveProject(projectId, user._id, function(err) {
|
||||
if (err != null) {
|
||||
return next(err)
|
||||
} else {
|
||||
return res.sendStatus(200)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
expireDeletedProjectsAfterDuration(req, res) {
|
||||
logger.log(
|
||||
'received request to look for old deleted projects and expire them'
|
||||
|
||||
Reference in New Issue
Block a user