Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
@@ -11,3 +11,17 @@ async def get_order_status(request: Request):
|
|
11 |
"status": "success",
|
12 |
"order_status": f"Your order is confirmed and is being processed. this status ccoming from api phone_number:{phone_number} and dob:{dob}"
|
13 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
"status": "success",
|
12 |
"order_status": f"Your order is confirmed and is being processed. this status ccoming from api phone_number:{phone_number} and dob:{dob}"
|
13 |
}
|
14 |
+
|
15 |
+
|
16 |
+
@app.post('/book_ticket')
|
17 |
+
async def book_ticket(request: Request):
|
18 |
+
body = await request.json()
|
19 |
+
movie_name = request.query_params.get("movie_name")
|
20 |
+
username = body.get("username")
|
21 |
+
time = body.get("time")
|
22 |
+
price = body.get("price")
|
23 |
+
|
24 |
+
return {
|
25 |
+
"status": "success",
|
26 |
+
"message": f"Ticket booked for '{movie_name}'. Username: {username}, Time: {time}, Price: {price}"
|
27 |
+
}
|