@אבי-203 אמר בבניית טופס רכישה לפי אותיות:
מצורף. תודה.
לשם 'אבא'
}

export function postData(word){
for(var l of word){
console.log(l);
wixData.query("ot")
.contains('ot', l)
.find()
.then( (results) => {
let itemupdate = results.items[0].ms - 1;
console.log(itemupdate);
if(itemupdate > 0) {
let item = results.items[0];
item.ms = itemupdate;
console.log(item);
wixData.update("ot", item);
} else {
console.log("נגמר האות, חפש אות אחרת או אות אקראית");
}
} )
.catch( (err) => {
let errorMsg = err;
} );
}
return;
}