update bindTicketShelving
This commit is contained in:
parent
8aff89c6b0
commit
0024c9877e
|
@ -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);
|
||||
|
|
Reference in New Issue