event and service sendpoints added

This commit is contained in:
2025-04-30 18:19:31 +03:00
parent 36e63960f8
commit e815251123
24 changed files with 441 additions and 79 deletions

View File

@@ -304,7 +304,9 @@ def authentication_token_check_post(
status_code=status.HTTP_406_NOT_ACCEPTABLE,
headers=headers,
)
if AuthHandlers.LoginHandler.authentication_check_token_valid(domain=domain,access_token=token):
if AuthHandlers.LoginHandler.authentication_check_token_valid(
domain=domain, access_token=token
):
return JSONResponse(
content={"message": "MSG_0001"},
status_code=status.HTTP_202_ACCEPTED,

View File

@@ -172,7 +172,9 @@ class LoginHandler:
)
other_domains_list, main_domain = [], ""
with mongo_handler.collection(f"{str(found_user.related_company)}*Domain") as collection:
with mongo_handler.collection(
f"{str(found_user.related_company)}*Domain"
) as collection:
result = collection.find_one({"user_uu_id": str(found_user.uu_id)})
if not result:
raise ValueError("EYS_00087")
@@ -180,7 +182,7 @@ class LoginHandler:
main_domain = result.get("main_domain", None)
if domain not in other_domains_list or not main_domain:
raise ValueError("EYS_00088")
if not user_handler.check_password_valid(
domain=main_domain,
id_=str(found_user.uu_id),
@@ -298,7 +300,9 @@ class LoginHandler:
access_key=data.access_key, db_session=db_session
)
other_domains_list, main_domain = [], ""
with mongo_handler.collection(f"{str(found_user.related_company)}*Domain") as collection:
with mongo_handler.collection(
f"{str(found_user.related_company)}*Domain"
) as collection:
result = collection.find_one({"user_uu_id": str(found_user.uu_id)})
if not result:
raise ValueError("EYS_00087")
@@ -314,7 +318,6 @@ class LoginHandler:
password_hashed=found_user.hash_password,
):
raise ValueError("EYS_0005")
occupants_selection_dict: Dict[str, Any] = {}
living_spaces: list[BuildLivingSpace] = BuildLivingSpace.filter_all(