mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-04 22:59:01 +02:00
Migrate Features to ES modules
GitOrigin-RevId: 4e9d3176b4b5a5504afc102e569a27d7788864a3
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
/* eslint-disable
|
||||
max-len,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
// Fix any style issues and re-enable lint.
|
||||
/*
|
||||
* decaffeinate suggestions:
|
||||
* DS102: Remove unnecessary code created because of implicit returns
|
||||
* DS207: Consider shorter variations of null checks
|
||||
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
||||
*/
|
||||
import InactiveProjectManager from './InactiveProjectManager.js'
|
||||
|
||||
export default {
|
||||
deactivateOldProjects(req, res) {
|
||||
const numberOfProjectsToArchive = parseInt(
|
||||
req.body.numberOfProjectsToArchive,
|
||||
10
|
||||
)
|
||||
const { ageOfProjects } = req.body
|
||||
return InactiveProjectManager.deactivateOldProjects(
|
||||
numberOfProjectsToArchive,
|
||||
ageOfProjects,
|
||||
function (err, projectsDeactivated) {
|
||||
if (err != null) {
|
||||
return res.sendStatus(500)
|
||||
} else {
|
||||
return res.json(projectsDeactivated)
|
||||
}
|
||||
}
|
||||
)
|
||||
},
|
||||
|
||||
deactivateProject(req, res) {
|
||||
const { project_id: projectId } = req.params
|
||||
return InactiveProjectManager.deactivateProject(projectId, function (err) {
|
||||
if (err != null) {
|
||||
return res.sendStatus(500)
|
||||
} else {
|
||||
return res.sendStatus(200)
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user