Spaces:
Sleeping
Sleeping
Update garuda/api/router.py
Browse files- garuda/api/router.py +1 -1
garuda/api/router.py
CHANGED
|
@@ -173,7 +173,7 @@ def booking_payment(data: BookingPaymentRequest):
|
|
| 173 |
raise HTTPException(404, "Booking not found")
|
| 174 |
|
| 175 |
if booking["status"] == "complete":
|
| 176 |
-
raise HTTPException(400, "Booking already paid")
|
| 177 |
|
| 178 |
if booking["price_paid"] != data.payment_amount:
|
| 179 |
raise HTTPException(400, "Payment amount is incorrect")
|
|
|
|
| 173 |
raise HTTPException(404, "Booking not found")
|
| 174 |
|
| 175 |
if booking["status"] == "complete":
|
| 176 |
+
raise HTTPException(400, "Booking already paid at " + booking["paid_at"].strftime("%d-%m-%Y %H:%M"))
|
| 177 |
|
| 178 |
if booking["price_paid"] != data.payment_amount:
|
| 179 |
raise HTTPException(400, "Payment amount is incorrect")
|