Commit | Line | Data |
---|---|---|
625022fd BA |
1 | // Get variants list (always needed) |
2 | ||
3 | let router = require("express").Router(); | |
625022fd BA |
4 | const VariantModel = require("../models/Variant"); |
5 | const access = require("../utils/access"); | |
6 | ||
e57c4de4 | 7 | router.get('/variants', access.ajax, function(req, res) { |
dac39588 | 8 | VariantModel.getAll((err,variants) => { |
58aedcd1 | 9 | res.json(err || { variantArray:variants }); |
dac39588 | 10 | }); |
625022fd BA |
11 | }); |
12 | ||
13 | module.exports = router; |