1 // Get variants list (always needed)
3 let router
= require("express").Router();
4 const createError
= require('http-errors');
5 const VariantModel
= require("../models/Variant");
6 const access
= require("../utils/access");
8 router
.get('/variants', access
.ajax
, function(req
, res
, next
) {
9 VariantModel
.getAll((err
,variants
) => {
12 res
.json({variantArray:variants
});
16 module
.exports
= router
;