diff options
author | Noah Loomans <noahloomans@gmail.com> | 2016-11-10 15:28:13 +0100 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2016-11-10 15:28:13 +0100 |
commit | 026ec47c693d74307ba780b8e998f0196dd9f195 (patch) | |
tree | 8d821d226c4a8abf60d288a5c5c0d7a2834f5dc4 /routes | |
parent | 63faeefede9c0cd9a68a5a88b2fedc8ea722cd8f (diff) |
added new style unit test
Diffstat (limited to 'routes')
-rw-r--r-- | routes/index.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/routes/index.js b/routes/index.js index f30abb5..07192b7 100644 --- a/routes/index.js +++ b/routes/index.js @@ -4,7 +4,11 @@ const users = require('../lib/getUserIndex') /* GET home page. */ router.get('/', function (req, res, next) { - res.render('index', { users: users.users }) + if (req.query.v === 'n') { + res.render('index', { version: 'new', users: users.users }) + } else { + res.render('index', { version: 'old', users: users.users }) + } }) module.exports = router |