delete inserts

This commit is contained in:
alexmorenograu 2021-03-11 16:46:58 +01:00
parent 4a4269ca05
commit 08a801ac0d
1 changed files with 0 additions and 46 deletions

View File

@ -1,46 +0,0 @@
function insertShelving(shelving, level){
const config = require('../config');
const got = require('got');
(async() => {
const info = await config.info
let key = info.data.token
let currentUser = info.data.currentUser;
(async() => {
const { body } = await got.post('http://app.etiquetaselectronicas.com:9999/item/batchImportItem', {
json: {
agencyId: currentUser.agencyId,
merchantId: currentUser.merchantId,
storeId: currentUser.storeId,
unitName: currentUser.unitName,
itemList: [
{
attrCategory: "verdnatura",
attrName: "sinTicket",
barCode: shelving + level,//Matricula + nivel
itemTitle: "Etiqueta Sin ticket",
}
]
},
responseType: 'json',
headers: {
"Authorization": key
}
})
console.log(body)
})();
})();
}
function filter(toFilter, type){
if(type=="barcode"){
exp = /A0A3B82[A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9]/
}
if(type=="shelving"){
exp = /[A-F][A-F][A-F]/
}
return exp.test(toFilter)
}
exports.insertShelving = insertShelving;
exports.filter = filter;