THIS_SITE_URL="https://qa-panel.mermsemr.com"
This commit is contained in:
@@ -13,6 +13,8 @@ API_URL="/swagger.json"
|
||||
# VALID_API_KEY=*************
|
||||
# BASIC_AUTH_USERNAME=******
|
||||
# BASIC_AUTH_PASSWORD=******
|
||||
#THIS_SITE_URL="http://localhost:8090"
|
||||
THIS_SITE_URL="https://qa-panel.mermsemr.com"
|
||||
|
||||
SWAGGER_URL="/documentation"
|
||||
API_URL="/swagger.json"
|
||||
|
||||
@@ -13,6 +13,7 @@ API_URL="/swagger.json"
|
||||
# VALID_API_KEY=*************
|
||||
# BASIC_AUTH_USERNAME=******
|
||||
# BASIC_AUTH_PASSWORD=******
|
||||
THIS_SITE_URL="https://panel.mermsemr.com"
|
||||
|
||||
SWAGGER_URL="/documentation"
|
||||
API_URL="/swagger.json"
|
||||
|
||||
@@ -18,6 +18,7 @@ DATABASE_NAME=firstadvancedev
|
||||
# DATABASE_PASSWORD=firstadvance
|
||||
# DATABASE_NAME=firstadvancedev
|
||||
# DATABASE_PORT=5432
|
||||
THIS_SITE_URL="https://qa-panel.mermsemr.com"
|
||||
|
||||
# Flask Configuration
|
||||
FLASK_APP=wsgi.py
|
||||
|
||||
@@ -13,6 +13,7 @@ API_URL="/swagger.json"
|
||||
# VALID_API_KEY=*************
|
||||
# BASIC_AUTH_USERNAME=******
|
||||
# BASIC_AUTH_PASSWORD=******
|
||||
THIS_SITE_URL="https://qa-panel.mermsemr.com"
|
||||
|
||||
SWAGGER_URL="/documentation"
|
||||
API_URL="/swagger.json"
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ VALID_APP_ID=**********
|
||||
VALID_API_KEY=*************
|
||||
BASIC_AUTH_USERNAME=******
|
||||
BASIC_AUTH_PASSWORD=******
|
||||
|
||||
THIS_SITE_URL="https://qa-panel.mermsemr.com"
|
||||
|
||||
SWAGGER_URL="/documentation"
|
||||
API_URL="/swagger.json"
|
||||
|
||||
@@ -20,7 +20,7 @@ class BaseService:
|
||||
|
||||
SEND_EMAIL_FROM = Config.SEND_EMAIL_FROM
|
||||
SEND_EMAIL_PASS = Config.SEND_EMAIL_PASS
|
||||
|
||||
THIS_SITE_URL = Config.THIS_SITE_URL
|
||||
|
||||
@staticmethod
|
||||
def send_resetpass_mail(signup_email, pending_uid, pending_id, firstname, lastname):
|
||||
@@ -39,7 +39,7 @@ class BaseService:
|
||||
{"user": pending_member, 'exp': datetime.datetime.utcnow() + datetime.timedelta(minutes=3330)},
|
||||
BaseService.JWT_SECRET_KEY, algorithm='HS256'
|
||||
)
|
||||
panel_url = "https://qa-panel.mermsemr.com"
|
||||
panel_url = BaseService.THIS_SITE_URL #"https://qa-panel.mermsemr.com"
|
||||
link_url = str(panel_url) + '/accreset/' + jwt_part
|
||||
|
||||
msg_body = f"""
|
||||
|
||||
@@ -16,7 +16,7 @@ from app.api.schemas.login import LoginSchema
|
||||
from app.api.schemas.reset_pass_start import ResetPassStart
|
||||
from app.api.schemas.reset_pass_verify import ResetPassVerify
|
||||
from app.api.schemas.reset_pass_complete import ResetPassComplete
|
||||
|
||||
import json
|
||||
|
||||
import datetime
|
||||
import jwt
|
||||
@@ -75,15 +75,15 @@ class LoginService(BaseService):
|
||||
|
||||
validated_data = LoginService.validate_data(data, ResetPassVerify())
|
||||
reset_token = validated_data.get('reset_token')
|
||||
|
||||
logger.error("GOT HERE 000001 ")
|
||||
data ={}
|
||||
if not reset_token:
|
||||
return jsonify({'message': 'Error - missing reset_token '}), 403
|
||||
try:
|
||||
data = jwt.decode(reset_token, LoginService.JWT_SECRET_KEY, algorithms=["HS256"])
|
||||
except:
|
||||
return jsonify({'status': 'INVALID', 'message': 'Link is invalid'}), 403
|
||||
|
||||
return jsonify({'status': 'INVALID2', 'message': 'Link is invalid'}), 403
|
||||
logger.error("GOT HERE 000002 ")
|
||||
if not data:
|
||||
invalid_data = {
|
||||
"error_message": "The link is invalid please try again later",
|
||||
@@ -92,10 +92,13 @@ class LoginService(BaseService):
|
||||
}
|
||||
return ResponseHelper.success(data=invalid_data)
|
||||
|
||||
user_data = data["user"]
|
||||
|
||||
logger.error(f"GOT HERE 000003 {user_data}")
|
||||
response_data = {
|
||||
"error_message": "",
|
||||
"pending_uid": data["pending_uid"],
|
||||
"pending_id": data["pending_id"],
|
||||
"pending_uid": user_data["pending_uid"],
|
||||
"pending_id": user_data["pending_id"],
|
||||
"reset_message": "Check your email to continue password reset.",
|
||||
"message_key": "continue_reset",
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ class RegisterService(BaseService):
|
||||
|
||||
SEND_EMAIL_FROM = Config.SEND_EMAIL_FROM
|
||||
SEND_EMAIL_PASS = Config.SEND_EMAIL_PASS
|
||||
THIS_SITE_URL = Config.THIS_SITE_URL
|
||||
|
||||
@staticmethod
|
||||
def encrypt_password(self, password):
|
||||
@@ -205,7 +206,7 @@ def send_register_mail(signup_email, pending_uid,pending_id,firstname, lastname)
|
||||
{"user": pending_member, 'exp' : datetime.datetime.utcnow() + datetime.timedelta(minutes=3330)},
|
||||
RegisterService.JWT_SECRET_KEY, algorithm='HS256'
|
||||
)
|
||||
panel_url = "https://qa-panel.mermsemr.com"
|
||||
panel_url = panel_url = RegisterService.THIS_SITE_URL # "https://qa-panel.mermsemr.com"
|
||||
link_url= str(panel_url) + '/csignup/' + jwt_part
|
||||
|
||||
msg_body = f"""
|
||||
|
||||
@@ -12,6 +12,8 @@ class Config:
|
||||
BASIC_AUTH_USERNAME = os.environ.get("BASIC_AUTH_USERNAME", "user")
|
||||
BASIC_AUTH_PASSWORD = os.environ.get("BASIC_AUTH_PASSWORD", "password")
|
||||
|
||||
THIS_SITE_URL = os.getenv("THIS_SITE_URL", "https://qa-panel.mermsemr.com/")
|
||||
|
||||
#Email Server
|
||||
SEND_EMAIL_FROM = os.environ.get("SEND_EMAIL_FROM","message@chiefsoft.com")
|
||||
SEND_EMAIL_PASS = os.environ.get("SEND_EMAIL_PASS","may12002!")
|
||||
|
||||
Reference in New Issue
Block a user