Send inventory to rust

This commit is contained in:
Bianca Fürstenau 2025-02-16 16:01:14 +01:00
parent 43bcfac938
commit e4dc811434
4 changed files with 16 additions and 6 deletions

View file

@ -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) {