ProjectApiController.mjs 828 B

123456789101112131415161718192021222324252627282930
  1. /* eslint-disable
  2. max-len,
  3. no-unused-vars,
  4. */
  5. // TODO: This file was created by bulk-decaffeinate.
  6. // Fix any style issues and re-enable lint.
  7. /*
  8. * decaffeinate suggestions:
  9. * DS102: Remove unnecessary code created because of implicit returns
  10. * DS207: Consider shorter variations of null checks
  11. * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
  12. */
  13. import ProjectDetailsHandler from './ProjectDetailsHandler.js'
  14. import logger from '@overleaf/logger'
  15. export default {
  16. getProjectDetails(req, res, next) {
  17. const { project_id: projectId } = req.params
  18. return ProjectDetailsHandler.getDetails(
  19. projectId,
  20. function (err, projDetails) {
  21. if (err != null) {
  22. return next(err)
  23. }
  24. return res.json(projDetails)
  25. }
  26. )
  27. },
  28. }