MemberController.ts 522 B

12345678910111213141516171819
  1. import Express = require('express');
  2. import {UserManager} from "../manager/UserManager";
  3. export class MemberController {
  4. public static createRoute(r:Express.router) {
  5. let prefix = "/member/";
  6. r.all(prefix, MemberController.home);
  7. }
  8. public static home(req, res, next) {
  9. let level = req.query.level;
  10. let manageUser = new UserManager();
  11. manageUser.findById(req.session.user._id, function (user) {
  12. res.render("Member/home", {user: user});
  13. });
  14. }
  15. }