fix email
This commit is contained in:
@@ -23,7 +23,7 @@ from app.config import Config
|
|||||||
|
|
||||||
|
|
||||||
class RegisterService(BaseService):
|
class RegisterService(BaseService):
|
||||||
|
JWT_SECRET_KEY = Config.JWT_SECRET_KEY
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def process_request(data):
|
def process_request(data):
|
||||||
"""
|
"""
|
||||||
@@ -51,6 +51,7 @@ class RegisterService(BaseService):
|
|||||||
# "lastname": "Ameye",
|
# "lastname": "Ameye",
|
||||||
# "isChecked": true
|
# "isChecked": true
|
||||||
# }
|
# }
|
||||||
|
send_register_mail(regData.email, regData.uid, regData.id+1, firstname)
|
||||||
|
|
||||||
response_data = {
|
response_data = {
|
||||||
"member_id": 0,
|
"member_id": 0,
|
||||||
@@ -101,6 +102,8 @@ class RegisterService(BaseService):
|
|||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def send_register_mail(signup_email, email_uid,last_row_id,firstname):
|
def send_register_mail(signup_email, email_uid,last_row_id,firstname):
|
||||||
signup_data = {}
|
signup_data = {}
|
||||||
signup_data["id"] = last_row_id
|
signup_data["id"] = last_row_id
|
||||||
@@ -109,9 +112,9 @@ def send_register_mail(signup_email, email_uid,last_row_id,firstname):
|
|||||||
|
|
||||||
jwt_part = jwt.encode(
|
jwt_part = jwt.encode(
|
||||||
{"user": signup_data, 'exp' : datetime.datetime.utcnow() + datetime.timedelta(minutes=3330)},
|
{"user": signup_data, 'exp' : datetime.datetime.utcnow() + datetime.timedelta(minutes=3330)},
|
||||||
app.config["SECRET_KEY"],
|
RegisterService.JWT_SECRET_KEY, algorithm='HS256'
|
||||||
algorithm="HS256"
|
|
||||||
)
|
)
|
||||||
|
panel_url = "www.me.com"
|
||||||
link_url= str(panel_url) + '/csignup/' + jwt_part
|
link_url= str(panel_url) + '/csignup/' + jwt_part
|
||||||
print(link_url)
|
print(link_url)
|
||||||
#firstname ='Name001'
|
#firstname ='Name001'
|
||||||
|
|||||||
Reference in New Issue
Block a user