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.
smart-tag/methods/setCollection.js

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;