Commit | Line | Data |
---|---|---|
298c42e6 | 1 | let router = require("express").Router(); |
8d7e2786 BA |
2 | const VariantModel = require("../models/Variant"); |
3 | const selectLanguage = require("../utils/language.js"); | |
298c42e6 BA |
4 | |
5 | router.get('/', function(req, res, next) { | |
8d7e2786 BA |
6 | VariantModel.getAll((err,variants) => { |
7 | if (!!err) | |
8 | return next(err); | |
9 | res.render('index', { | |
10 | title: 'club', | |
11 | variantArray: variants, | |
12 | lang: selectLanguage(req, res), | |
298c42e6 BA |
13 | }); |
14 | }); | |
15 | }); | |
16 | ||
17 | module.exports = router; |