Save current state (unmerged, broken, not working...)
[vchess.git] / routes / index.js
CommitLineData
298c42e6 1let router = require("express").Router();
8d7e2786
BA
2const VariantModel = require("../models/Variant");
3const selectLanguage = require("../utils/language.js");
298c42e6
BA
4
5router.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
17module.exports = router;