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;