changed post to deactivate projects to set params via body rather than query params

This commit is contained in:
Henry Oswald 2015-08-19 11:55:35 +01:00
parent 50fc886c94
commit a777fcc5a6

View file

@ -6,8 +6,8 @@ module.exports =
deactivateOldProjects: (req, res)-> deactivateOldProjects: (req, res)->
logger.log "recived request to deactivate old projects" logger.log "recived request to deactivate old projects"
numberOfProjectsToArchive = req.query.limit numberOfProjectsToArchive = req.body.numberOfProjectsToArchive
ageOfProjects = req.query.daysOld ageOfProjects = req.body.ageOfProjects
InactiveProjectManager.deactivateOldProjects numberOfProjectsToArchive, ageOfProjects, (err, projectsDeactivated)-> InactiveProjectManager.deactivateOldProjects numberOfProjectsToArchive, ageOfProjects, (err, projectsDeactivated)->
if err? if err?
res.sendStatus(500) res.sendStatus(500)