Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
F
fast-food
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Мырзабеков Бекайдар
fast-food
Commits
4170c57c
Commit
4170c57c
authored
Nov 28, 2023
by
Мырзабеков Бекайдар
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed get orders
parent
0fe70edd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
schemas.py
src/app/api/order/schemas.py
+1
-0
services.py
src/app/api/order/services.py
+1
-1
No files found.
src/app/api/order/schemas.py
View file @
4170c57c
...
@@ -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
src/app/api/order/services.py
View file @
4170c57c
...
@@ -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'
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment