Spaces:
Sleeping
Sleeping
OnlyBiggg
commited on
Commit
·
7360f4e
1
Parent(s):
db895c2
fix: seats
Browse files
app/dialogflow/api/v1/dialogflow.py
CHANGED
|
@@ -750,6 +750,7 @@ async def seats_trip(request: Request) -> Response:
|
|
| 750 |
seats = await dialog_service.seats_trip(route_id, trip_id, departure_date, departure_time, kind)
|
| 751 |
seats_empty = [ seat for seat in seats if seat["bookStatus"] == 0 ]
|
| 752 |
seats_empty.sort(key=lambda x: x["chair"])
|
|
|
|
| 753 |
text=["Quý khách vui lòng chọn ghế"]
|
| 754 |
payload={
|
| 755 |
"richContent": [
|
|
|
|
| 750 |
seats = await dialog_service.seats_trip(route_id, trip_id, departure_date, departure_time, kind)
|
| 751 |
seats_empty = [ seat for seat in seats if seat["bookStatus"] == 0 ]
|
| 752 |
seats_empty.sort(key=lambda x: x["chair"])
|
| 753 |
+
print(seats_empty)
|
| 754 |
text=["Quý khách vui lòng chọn ghế"]
|
| 755 |
payload={
|
| 756 |
"richContent": [
|
app/dialogflow/services/dialog_service.py
CHANGED
|
@@ -88,7 +88,6 @@ class DialogService:
|
|
| 88 |
if params is None:
|
| 89 |
return []
|
| 90 |
response = await api.get(api_base=settings.API_BASE_URL_VATO, endpoint=f"/seats/{route_id}/{trip_id}" , params=params)
|
| 91 |
-
print(response)
|
| 92 |
if response.get("data"):
|
| 93 |
return []
|
| 94 |
seats = response["data"]
|
|
|
|
| 88 |
if params is None:
|
| 89 |
return []
|
| 90 |
response = await api.get(api_base=settings.API_BASE_URL_VATO, endpoint=f"/seats/{route_id}/{trip_id}" , params=params)
|
|
|
|
| 91 |
if response.get("data"):
|
| 92 |
return []
|
| 93 |
seats = response["data"]
|