create item barebones

This commit is contained in:
2026-01-02 15:57:49 +01:00
parent 7708df3410
commit 69ba0ccf7c
3 changed files with 116 additions and 35 deletions

View File

@@ -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}