This repository has been archived on 2024-10-02. You can view files and clone it, but cannot push or open issues or pull requests.
2021-03-18 15:12:45 +00:00
|
|
|
const express = require('express');
|
|
|
|
const router = express.Router(); // eslint-disable-line
|
|
|
|
|
|
|
|
router.get('/:collectionFk', async(req, res) => {
|
2021-05-13 07:08:30 +00:00
|
|
|
const maxWagon = require('../db/maxWagon__');
|
2021-03-18 15:12:45 +00:00
|
|
|
// var collectionFk = '273449';
|
|
|
|
const collectionFk = req.params.collectionFk;
|
2021-03-24 10:45:57 +00:00
|
|
|
maxWagon.maxWagon(collectionFk, function(err, max) {
|
|
|
|
let maxWagons = max[0].MaxWagons;
|
|
|
|
res.json({
|
|
|
|
message: 'SUCCESS',
|
|
|
|
maxWagons: maxWagons
|
|
|
|
});
|
2021-03-18 15:12:45 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
module.exports = router;
|
|
|
|
|