update item amount

This commit is contained in:
2026-01-02 15:14:58 +01:00
parent ab27bcb5bc
commit 7708df3410
2 changed files with 57 additions and 4 deletions

View File

@@ -190,7 +190,15 @@ export function HotelProvider({ accessToken, children, resClientId}) {
}
async function updateItemAmount(item_id, item_amount) {
const res = await fetch ( `${API_BASE}/inventory/update_item/${item_id}/${item_amount}`,
{
method: "PUT",
headers: { Authorization: `Bearer ${accessTokenSingle}` }
});
}
async function fetchHotelUsers() {
const res = await fetch(`${API_BASE}/chat/hotel_users`, {
@@ -252,7 +260,8 @@ export function HotelProvider({ accessToken, children, resClientId}) {
fetchHotelUsers,
addUserToConv,
createConversation,
fetchHotelInventory
fetchHotelInventory,
updateItemAmount
}}
>
{children}