Skip to content
Snippets Groups Projects
Commit 667f1390 authored by Sahu, Pratyush K (PG/T - Comp Sci & Elec Eng)'s avatar Sahu, Pratyush K (PG/T - Comp Sci & Elec Eng)
Browse files

Fixed Booking

parent e823b334
No related branches found
No related tags found
No related merge requests found
...@@ -196,7 +196,7 @@ async def update_booking(update: UpdateBooking): ...@@ -196,7 +196,7 @@ async def update_booking(update: UpdateBooking):
# Perform database updates within a transaction # Perform database updates within a transaction
try: try:
cursor.execute("UPDATE Bookings SET end_time = %s, payment_state = 'Completed' WHERE booking_id = %s", cursor.execute("UPDATE Bookings SET end_time = %s, payment_state = 'Ride Completed' WHERE booking_id = %s",
(end_time.strftime('%Y-%m-%d %H:%M:%S'), update.booking_id)) (end_time.strftime('%Y-%m-%d %H:%M:%S'), update.booking_id))
cursor.execute("UPDATE Users SET wallet_balance = %s WHERE user_id = %s", cursor.execute("UPDATE Users SET wallet_balance = %s WHERE user_id = %s",
(new_wallet_balance, update.user_id)) (new_wallet_balance, update.user_id))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment