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/bindShelving.js

26 lines
853 B
JavaScript
Raw Normal View History

2021-03-11 15:39:10 +00:00
function bindShelving(barcode, shelving, level){
2021-03-11 14:41:03 +00:00
const config = require('./config');
2021-03-11 15:39:10 +00:00
const got = require('got');
2021-03-11 14:41:03 +00:00
(async() => {
2021-03-11 15:39:10 +00:00
const info = await config.info
let key = info.data.token;
2021-03-11 14:41:03 +00:00
(async() => {
2021-03-11 15:39:10 +00:00
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(body)
})();
2021-03-11 14:41:03 +00:00
})();
}
2021-03-11 15:39:10 +00:00
exports.bindShelving = bindShelving;