NPC shop implimented

This commit is contained in:
2025-11-29 01:16:46 -06:00
parent 32af625d14
commit 8bd494a52f
17 changed files with 4265 additions and 17 deletions

View File

@@ -421,7 +421,7 @@ class SessionService:
from the database. Use this when the user wants to free up their session
slot and doesn't need to preserve the game history.
Also deletes all chat messages associated with this session.
Also deletes all chat messages and shop transactions associated with this session.
Args:
session_id: Session ID to delete
@@ -439,7 +439,15 @@ class SessionService:
# Verify ownership first (raises SessionNotFound if invalid)
self.get_session(session_id, user_id)
# Delete associated chat messages first
# Delete associated shop transactions first
from app.services.shop_service import get_shop_service
shop_service = get_shop_service()
deleted_transactions = shop_service.delete_transactions_by_session(session_id)
logger.info("Deleted associated transactions",
session_id=session_id,
transaction_count=deleted_transactions)
# Delete associated chat messages
chat_service = get_chat_message_service()
deleted_messages = chat_service.delete_messages_by_session(session_id)
logger.info("Deleted associated chat messages",