aboutsummaryrefslogtreecommitdiff
path: root/routes/index.js
blob: 07192b79811a4289ddf055d0bb314e79486f80d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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 })
  }
})

module.exports = router