create item barebones
This commit is contained in:
@@ -200,6 +200,16 @@ export function HotelProvider({ accessToken, children, resClientId}) {
|
||||
|
||||
}
|
||||
|
||||
async function createItem(item_name, item_amount){
|
||||
|
||||
const res = await fetch ( `${API_BASE}/inventory/add_item/${item_name}/${item_amount}`,
|
||||
{
|
||||
method:"POST",
|
||||
headers: { Authorization: `Bearer ${accessTokenSingle}` }
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
async function fetchHotelUsers() {
|
||||
const res = await fetch(`${API_BASE}/chat/hotel_users`, {
|
||||
method: "POST",
|
||||
@@ -261,7 +271,8 @@ export function HotelProvider({ accessToken, children, resClientId}) {
|
||||
addUserToConv,
|
||||
createConversation,
|
||||
fetchHotelInventory,
|
||||
updateItemAmount
|
||||
updateItemAmount,
|
||||
createItem
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
|
||||
Reference in New Issue
Block a user