19 lines
511 B
JavaScript
19 lines
511 B
JavaScript
const express = require('express');
|
|
const router = express.Router(); // eslint-disable-line
|
|
|
|
router.get('/:collectionFk', async(req, res) => {
|
|
const maxWagon = require('../db/maxWagon');
|
|
// var collectionFk = '273449';
|
|
const collectionFk = req.params.collectionFk;
|
|
maxWagon.maxWagon(collectionFk, function(err, max) {
|
|
let maxWagons = max[0].MaxWagons;
|
|
res.json({
|
|
message: 'SUCCESS',
|
|
maxWagons: maxWagons
|
|
});
|
|
});
|
|
});
|
|
|
|
module.exports = router;
|
|
|