updated services api
This commit is contained in:
@@ -2,7 +2,7 @@ import arrow
|
||||
|
||||
from typing import Any, Dict, Optional, Union
|
||||
from config import api_config
|
||||
from schemas import (
|
||||
from Schemas import (
|
||||
Users,
|
||||
People,
|
||||
BuildLivingSpace,
|
||||
@@ -23,11 +23,11 @@ from schemas import (
|
||||
Events,
|
||||
EndpointRestriction,
|
||||
)
|
||||
from api_modules.token.password_module import PasswordModule
|
||||
from api_controllers.mongo.database import mongo_handler
|
||||
from api_validations.token.validations import TokenDictType, EmployeeTokenObject, OccupantTokenObject, CompanyToken, OccupantToken, UserType
|
||||
from api_validations.defaults.validations import CommonHeaders
|
||||
from api_modules.redis.redis_handlers import RedisHandlers
|
||||
from Controllers.mongo.database import mongo_handler
|
||||
from Validations.token.validations import TokenDictType, EmployeeTokenObject, OccupantTokenObject, CompanyToken, OccupantToken, UserType
|
||||
from Validations.defaults.validations import CommonHeaders
|
||||
from Extends.redis.redis_handlers import RedisHandlers
|
||||
from Extends.token.password_module import PasswordModule
|
||||
from validations.password.validations import PasswordHistoryViaUser
|
||||
|
||||
|
||||
@@ -68,7 +68,6 @@ class LoginHandler:
|
||||
return str(email).split("@")[1] == api_config.ACCESS_EMAIL_EXT
|
||||
|
||||
@classmethod
|
||||
# headers: CommonHeaders
|
||||
def do_employee_login(cls, headers: CommonHeaders, data: Any, db_session):
|
||||
"""Handle employee login."""
|
||||
|
||||
@@ -159,7 +158,6 @@ class LoginHandler:
|
||||
raise ValueError("Something went wrong")
|
||||
|
||||
@classmethod
|
||||
# headers=headers, data=data, db_session=db_session
|
||||
def do_occupant_login(cls, headers: CommonHeaders, data: Any, db_session):
|
||||
"""
|
||||
Handle occupant login.
|
||||
@@ -376,7 +374,7 @@ class LoginHandler:
|
||||
)
|
||||
return {"selected_uu_id": occupant_token.living_space_uu_id}
|
||||
|
||||
@classmethod # Requires auth context
|
||||
@classmethod
|
||||
def authentication_select_company_or_occupant_type(cls, request: Any, data: Any):
|
||||
"""
|
||||
Handle selection of company or occupant type
|
||||
|
||||
Reference in New Issue
Block a user