report_router.js 663 B

123456789101112131415161718192021222324
  1. /**
  2. * Created by Tony on 2017/3/13.
  3. */
  4. var express = require('express');
  5. var rptRouter = express.Router();
  6. var pmController = require('./../controllers/pm_controller');
  7. rptRouter.get('/pm', function(req, res){
  8. if(!req.session.userAccount){
  9. res.redirect('/login');
  10. }
  11. else{
  12. res.render('pm/html/project-management.html',
  13. {userAccount: req.session.userAccount,
  14. userID: req.session.userID});
  15. }
  16. });
  17. rptRouter.post('/getProjects', pmController.getProjects);
  18. rptRouter.post('/updateProjects', pmController.updateProjects);
  19. rptRouter.post('/renameProject', pmController.rename);
  20. module.exports = rptRouter;