update bindTicketShelving

This commit is contained in:
llopis15 2021-05-13 09:37:21 +02:00
parent 8aff89c6b0
commit 0024c9877e
1 changed files with 2 additions and 7 deletions

View File

@ -1,21 +1,16 @@
const express = require('express');
const router = express.Router(); // eslint-disable-line
const select = require('../db/selectCollection');
const filter = require('../utilities/filter');
const insertTicketDB = require('../db/insertTicket');
router.get('/collectionFk', async(req, res) => {
const collectionFk = req.params.collectionFk;
console.log(collectionFk);
if (filter.isShelving(collectionShelving)) {
ticketShelving(collectionShelving, collectionFk);
res.json({message: 'SUCCESS'});
} else
res.json({message: 'SHELVING ERROR'});
ticketShelving(collectionFk);
});
module.exports = router;
function ticketShelving(collectionShelving, collectionFk) {// parametro collectionFk
function ticketShelving(collectionFk) {// parametro collectionFk
select.selectCollectionSmartTag(collectionFk, function(err, data) {
console.log(data);
insertTicket(data);