feat: update inventory frontend and services to current production state
This commit is contained in:
parent
7050cfb8b7
commit
fc557ab1d5
4 changed files with 1321 additions and 307 deletions
13
main.py
13
main.py
|
|
@ -2002,7 +2002,18 @@ async def ws_receive_snapshots(
|
|||
f"{INVENTORY_SERVICE_URL}/inventory/{char_name}/item",
|
||||
json=item
|
||||
)
|
||||
if resp.status_code >= 400:
|
||||
if resp.status_code < 400:
|
||||
# Use enriched item from inventory-service response for broadcast
|
||||
resp_json = resp.json()
|
||||
enriched_item = resp_json.get("item")
|
||||
if enriched_item:
|
||||
data = {
|
||||
"type": "inventory_delta",
|
||||
"action": action,
|
||||
"character_name": char_name,
|
||||
"item": enriched_item
|
||||
}
|
||||
else:
|
||||
logger.warning(f"Inventory service returned {resp.status_code} for delta {action}")
|
||||
|
||||
# Broadcast delta to all browser clients
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue