mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-07 08:09:01 +02:00
pass options through stating how long ago want to archive from and limit
This commit is contained in:
@@ -6,11 +6,13 @@ module.exports =
|
||||
|
||||
deactivateOldProjects: (req, res)->
|
||||
logger.log "recived request to deactivate old projects"
|
||||
InactiveProjectManager.deactivateOldProjects 10, (err)->
|
||||
numberOfProjectsToArchive = req.query.limit
|
||||
ageOfProjects = req.query.daysOld
|
||||
InactiveProjectManager.deactivateOldProjects numberOfProjectsToArchive, ageOfProjects, (err, projectsDeactivated)->
|
||||
if err?
|
||||
res.sendStatus(500)
|
||||
else
|
||||
res.sendStatus(200)
|
||||
res.send(projectsDeactivated)
|
||||
|
||||
|
||||
deactivateProject: (req, res)->
|
||||
|
||||
Reference in New Issue
Block a user