overleaf/services/web/app/coffee/Features/InactiveData/InactiveProjectController.coffee
2015-08-14 11:26:11 +01:00

23 lines
No EOL
618 B
CoffeeScript

InactiveProjectManager = require("./InactiveProjectManager")
logger = require("logger-sharelatex")
module.exports =
deactivateOldProjects: (req, res)->
logger.log "recived request to deactivate old projects"
InactiveProjectManager.deactivateOldProjects 10, (err)->
if err?
res.sendStatus(500)
else
res.sendStatus(200)
deactivateProject: (req, res)->
project_id = req.params.project_id
logger.log project_id:project_id, "recived request to deactivating project"
InactiveProjectManager.deactivateProject project_id, (err)->
if err?
res.sendStatus 500
else
res.sendStatus 200