Add show seat page

This commit is contained in:
t510599
2019-04-18 01:00:22 +08:00
parent b72333550e
commit 4bca82b1f7
2 changed files with 81 additions and 0 deletions

View File

@@ -45,6 +45,11 @@ router.post('/', function(req, res, next){
});
});
router.get('/show', function(req, res, next) {
var seats = JSON.parse(fs.readFileSync(path.resolve(__dirname, "../../cli/seats.txt"), 'utf8'));
res.render('show', { title: '自己選自己的', seats: seats});
});
router.get('/login', function(req, res, next) {
if (req.session.stdno) {
return res.redirect('.');