add description in sell
This commit is contained in:
@ -80,7 +80,7 @@ class MarketplaceService:
|
||||
raise HTTPException(status_code=404, detail="Предмет не найден")
|
||||
return _serialize_mongodb_doc(item)
|
||||
|
||||
async def add_item(self, username: str, slot_index: int, amount: int, price: int, server_ip: str):
|
||||
async def add_item(self, username: str, slot_index: int, amount: int, price: int, server_ip: str, description: str):
|
||||
"""Выставить предмет на продажу"""
|
||||
# Создаем операцию продажи
|
||||
operation_id = str(uuid.uuid4())
|
||||
@ -93,6 +93,7 @@ class MarketplaceService:
|
||||
"amount": amount,
|
||||
"price": price,
|
||||
"server_ip": server_ip,
|
||||
"description": description,
|
||||
"status": "pending",
|
||||
"created_at": datetime.utcnow()
|
||||
}
|
||||
@ -151,7 +152,7 @@ class MarketplaceService:
|
||||
"material": item_data.get("material"),
|
||||
"amount": item_data.get("amount"),
|
||||
"price": operation.get("price"),
|
||||
"description": item_data.get("description"),
|
||||
"description": operation.get("description"),
|
||||
"image_url": item_data.get("image_url"),
|
||||
"seller_name": operation.get("player_name"),
|
||||
"server_ip": operation.get("server_ip"),
|
||||
|
||||
Reference in New Issue
Block a user