test(T05): contact router, rental router, email service, rate limiting tests + retry queue
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user