27 lines
858 B
JavaScript
27 lines
858 B
JavaScript
const config = require('./config');
|
|
const got = require('got');
|
|
|
|
function bindShelving(barcode, shelving, level){
|
|
(async() => {
|
|
const info = await config.info
|
|
let key = info.data.token;
|
|
(async() => {
|
|
const { body } = await got.post('http://app.etiquetaselectronicas.com:9999/bind/batchBind', {
|
|
json: {
|
|
storeId: config.storeId,
|
|
tagItemBinds: [{
|
|
eslBarcode: barcode,
|
|
itemBarcode: shelving + level
|
|
}
|
|
]
|
|
},
|
|
responseType: 'json',
|
|
headers: {
|
|
"Authorization": key
|
|
}
|
|
})
|
|
console.log("ETIQUETA: ",body)
|
|
})();
|
|
})();
|
|
}
|
|
exports.bindShelving = bindShelving; |