fixed get orders

parent 0fe70edd
...@@ -31,5 +31,6 @@ class OrderStatusSchema(BaseModel): ...@@ -31,5 +31,6 @@ class OrderStatusSchema(BaseModel):
class OrderListSchema(BaseModel): class OrderListSchema(BaseModel):
id: UUID id: UUID
status: str status: str
total: float
created_at: datetime.datetime created_at: datetime.datetime
updated_at: datetime.datetime updated_at: datetime.datetime
...@@ -68,7 +68,7 @@ class OrderService: ...@@ -68,7 +68,7 @@ class OrderService:
"result": [ "result": [
OrderListSchema.model_validate( OrderListSchema.model_validate(
{ {
'id': order.id, 'status': order.status, 'id': order.id, 'status': order.status, 'total': order.total,
'created_at': order.created_at, 'updated_at': order.updated_at 'created_at': order.created_at, 'updated_at': order.updated_at
} }
) for order in orders['result'] ) for order in orders['result']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment