aboutsummaryrefslogtreecommitdiff
path: root/routes
diff options
context:
space:
mode:
Diffstat (limited to 'routes')
-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