mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-07-15 18:07:02 +00:00
[ZBKBCK-346] change password and forgot password api has been optimised
This commit is contained in:
@ -129,6 +129,28 @@ def send_otp_email(recipient_email, otp):
|
||||
)
|
||||
return otp
|
||||
|
||||
|
||||
@shared_task()
|
||||
def send_all_email(template_name, email, otp):
|
||||
"""
|
||||
Send all type of email by passing template name
|
||||
template_name: string
|
||||
email: string
|
||||
otp: string
|
||||
"""
|
||||
from_email = settings.EMAIL_FROM_ADDRESS
|
||||
recipient_list = [email]
|
||||
send_templated_mail(
|
||||
template_name=template_name,
|
||||
from_email=from_email,
|
||||
recipient_list=recipient_list,
|
||||
context={
|
||||
'verification_code': otp
|
||||
}
|
||||
)
|
||||
|
||||
return otp
|
||||
|
||||
@shared_task
|
||||
def user_device_details(user, device_id):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user