cnc-speed-calculator/routes/index.js
Sebastien Clement 39a02da5f4 🔨 Add manager
2021-01-30 20:33:06 +01:00

15 lines
527 B
JavaScript

var express = require('express');
var router = express.Router();
const sequelize = require('../sequelize')
/* GET home page. */
router.get('/', function (req, res, next) {
sequelize.models.preset_cut.findAll({ order: ['name'] }).then((preset_cut) => {
sequelize.models.preset_step_down_factor.findAll({ order: ['name'] }).then((step_down_factor) => {
res.render('index', { preset_cut: preset_cut, step_down_factor: step_down_factor, user: req.user });
});
});
});
module.exports = router;