aboutsummaryrefslogtreecommitdiff
path: root/routes/index.js
diff options
context:
space:
mode:
authorBuildTools <Noah Loomans>2016-12-07 18:44:52 +0100
committerBuildTools <Noah Loomans>2016-12-07 18:44:52 +0100
commit65bd3df149d7eb63d169bba40975f342609c100e (patch)
treeeb5b7126763ec7cafc8c0d4444a1765fadf72c62 /routes/index.js
parent286af7d09f6dd20b82510a6239e191ba48500fe9 (diff)
parentd90745b23fb55a0736b56c045e12de4b1b05786f (diff)
Merge branch 'beta'
Diffstat (limited to 'routes/index.js')
-rw-r--r--routes/index.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/routes/index.js b/routes/index.js
index 07192b7..1ab2ba3 100644
--- a/routes/index.js
+++ b/routes/index.js
@@ -1,14 +1,19 @@
+'use strict'
+
const express = require('express')
const router = express.Router()
const users = require('../lib/getUserIndex')
/* GET home page. */
router.get('/', function (req, res, next) {
- if (req.query.v === 'n') {
- res.render('index', { version: 'new', users: users.users })
- } else {
- res.render('index', { version: 'old', users: users.users })
+ let flags = []
+ if (req.query.nfd != null) {
+ flags.push('NO_FEATURE_DETECT')
}
+
+ const flagsStr = `var FLAGS = ${JSON.stringify(flags)};`
+ const usersStr = `var USERS = ${JSON.stringify(users.users)};`
+ res.render('index', { flagsStr, usersStr })
})
module.exports = router