Send inventory to rust
This commit is contained in:
parent
43bcfac938
commit
e4dc811434
4 changed files with 16 additions and 6 deletions
|
@ -33,9 +33,8 @@ async function increment(el) {
|
|||
async function inventory() {
|
||||
const form = document.querySelector("#cafe-inventory form");
|
||||
const fd = new FormData(form);
|
||||
for (let item of fd) {
|
||||
alert(item);
|
||||
}
|
||||
const obj = Object.fromEntries(fd);
|
||||
await invoke("inventory", { data: obj });
|
||||
}
|
||||
|
||||
async function swap(s) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue