Forbid castling when king doesn't move and is under check
[vchess.git] / server / routes / variants.js
CommitLineData
625022fd
BA
1// Get variants list (always needed)
2
3let router = require("express").Router();
4const createError = require('http-errors');
5const VariantModel = require("../models/Variant");
6const access = require("../utils/access");
7
8router.get('/variants', access.ajax, function(req, res, next) {
dac39588
BA
9 VariantModel.getAll((err,variants) => {
10 if (!!err)
11 return next(err);
12 res.json({variantArray:variants});
13 });
625022fd
BA
14});
15
16module.exports = router;