update item amount
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user