updated Service providers

This commit is contained in:
2025-04-05 22:54:05 +03:00
parent fa4df11323
commit 60507c87e0
21 changed files with 1134 additions and 183 deletions

View File

@@ -14,6 +14,7 @@ from ApiServices.AuthService.validations.request.authentication.login_post impor
RequestForgotPasswordPhone,
RequestForgotPasswordEmail,
RequestVerifyOTP,
RequestApplication,
)
from ApiServices.AuthService.events.auth.auth import AuthHandlers
@@ -367,7 +368,45 @@ def authentication_password_verify_otp(
"tz": tz or "GMT+3",
"token": token,
}
print('Token&OTP : ', data.otp, data.token)
print("Token&OTP : ", data.otp, data.token)
if not domain or not language:
return JSONResponse(
content={"error": "EYS_0003"},
status_code=status.HTTP_406_NOT_ACCEPTABLE,
headers=headers,
)
return JSONResponse(
content={},
status_code=status.HTTP_202_ACCEPTED,
headers=headers,
)
@auth_route.post(
path="/page/valid",
summary="Verify if page is valid returns application avaliable",
description="Verify if page is valid returns application avaliable",
)
def authentication_page_valid(
request: Request,
data: RequestApplication,
language: str = Header(None, alias="language"),
domain: str = Header(None, alias="domain"),
tz: str = Header(None, alias="timezone"),
):
"""
Verify if page is valid returns application that can user reach
page: { url = /building/create}
result: { "application": "4c11f5ef-0bbd-41ac-925e-f79d9aac2b0e" }
"""
token = request.headers.get(api_config.ACCESS_TOKEN_TAG, None)
headers = {
"language": language or "",
"domain": domain or "",
"eys-ext": f"{str(uuid.uuid4())}",
"tz": tz or "GMT+3",
"token": token,
}
if not domain or not language:
return JSONResponse(
content={"error": "EYS_0003"},