cnc-speed-calculator/routes/index.js

15 lines
527 B
JavaScript
Raw Normal View History

2021-01-27 23:36:51 +01:00
var express = require('express');
var router = express.Router();
const sequelize = require('../sequelize')
/* GET home page. */
2021-01-28 01:30:55 +01:00
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) => {
2021-01-30 20:33:06 +01:00
res.render('index', { preset_cut: preset_cut, step_down_factor: step_down_factor, user: req.user });
});
});
2021-01-27 23:36:51 +01:00
});
module.exports = router;