events and auth updated
This commit is contained in:
@@ -37,8 +37,7 @@ from .company.employee.router import employee_route
|
||||
from .events.events.bind_events_router import bind_events_route
|
||||
|
||||
from .events.modules.router import modules_route
|
||||
from service_app.routers.events.modules.bind_events_router import bind_modules_route
|
||||
|
||||
from .events.modules.bind_events_router import bind_modules_route
|
||||
|
||||
from .events.services.bind_services_router import bind_services_route
|
||||
from .events.services.router import services_route
|
||||
|
||||
@@ -38,20 +38,17 @@ login_route.include_router(login_route, include_in_schema=True)
|
||||
def authentication_select_company_or_occupant_type(
|
||||
request: Request, data: Union[EmployeeSelection, OccupantSelection]
|
||||
):
|
||||
|
||||
active_function = getattr(
|
||||
AuthenticationSelectEventMethod,
|
||||
"authentication_select_company_or_occupant_type",
|
||||
token_dict = parse_token_object_to_dict(request=request)
|
||||
return AuthenticationSelectEventMethod.authentication_select_company_or_occupant_type(
|
||||
data=data, request=request, token_dict=token_dict
|
||||
)
|
||||
return active_function(data=data, request=request, token_dict=None)
|
||||
|
||||
|
||||
@login_route.post(path="/login", summary="Login user with domain and password")
|
||||
def authentication_login_with_domain_and_creds(request: Request, data: Login):
|
||||
active_function = getattr(
|
||||
AuthenticationLoginEventMethod, "authentication_login_with_domain_and_creds"
|
||||
return AuthenticationLoginEventMethod.authentication_login_with_domain_and_creds(
|
||||
request=request, data=data
|
||||
)
|
||||
return active_function(request=request, data=data)
|
||||
|
||||
|
||||
@login_route.get(path="/valid", summary="Check access token is valid")
|
||||
|
||||
Reference in New Issue
Block a user