test(T05): contact router, rental router, email service, rate limiting tests + retry queue
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -35,14 +35,15 @@ async def create_contact(
|
||||
|
||||
email_service = EmailService()
|
||||
try:
|
||||
await email_service.send_contact_email({
|
||||
sent = await email_service.send_contact_email({
|
||||
"name": payload.name,
|
||||
"email": str(payload.email),
|
||||
"phone": payload.phone,
|
||||
"message": payload.message,
|
||||
})
|
||||
contact.email_sent = True
|
||||
await db.commit()
|
||||
}, db=db)
|
||||
if sent:
|
||||
contact.email_sent = True
|
||||
await db.commit()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
@@ -133,6 +133,7 @@ async def create_rental_request(
|
||||
reference_number=ref_number,
|
||||
event_name=payload.event_name,
|
||||
items=items_data,
|
||||
db=db,
|
||||
)
|
||||
except Exception:
|
||||
# Email failure should not affect response
|
||||
|
||||
Reference in New Issue
Block a user