modified: slop_with_models.py
This commit is contained in:
parent
aa50b71c1b
commit
7a4ddd8688
1 changed files with 4 additions and 1 deletions
|
|
@ -299,6 +299,9 @@ def get_or_create_stats(game, agent_id):
|
|||
|
||||
def update_resource(resource_id, new_content):
|
||||
with resource_lock:
|
||||
# If the resource doesn't exist, initialize it with the correct structure
|
||||
if resource_id not in resources:
|
||||
resources[resource_id] = {"id": resource_id, "content": None}
|
||||
resources[resource_id]["content"] = new_content
|
||||
save_resources_to_file(resources)
|
||||
logger.debug(f"Updated resource {resource_id}: {new_content}")
|
||||
|
|
@ -808,7 +811,7 @@ def pay():
|
|||
logger.debug(f"Pay request data: {data}")
|
||||
amount = data.get("amount", 0)
|
||||
transaction_id = f"tx_{int(datetime.now().timestamp())}"
|
||||
logger.info(f"Processed payment of {amount} with transaction ID: {transaction_id}")
|
||||
logger.info(f"Processed payment of {amount} with transaction_id: {transaction_id}")
|
||||
return (
|
||||
jsonify(
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue