language models and set defaults are updated
This commit is contained in:
@@ -186,7 +186,9 @@ AuthenticationChangePasswordEventMethods.endpoint_callable = (
|
||||
|
||||
AuthenticationCreatePasswordEventMethods = MethodToEvent(
|
||||
name="AuthenticationCreatePasswordEventMethods",
|
||||
events={authentication_create_password_event.key: authentication_create_password_event},
|
||||
events={
|
||||
authentication_create_password_event.key: authentication_create_password_event
|
||||
},
|
||||
headers=[],
|
||||
errors=[],
|
||||
url="/create-password",
|
||||
|
||||
@@ -231,7 +231,7 @@ class AuthenticationFunctions:
|
||||
# Get token from login module
|
||||
user_login_module = UserLoginModule(request=request)
|
||||
user_login_module.login_user_via_credentials(access_data=data)
|
||||
user_login_module.language = "tr"
|
||||
user_login_module.language = "en"
|
||||
|
||||
# Return response with token and headers
|
||||
return EndpointSuccessResponse(
|
||||
@@ -244,23 +244,20 @@ class AuthenticationFunctions:
|
||||
Handle selection of company or occupant type
|
||||
{"data": {"build_living_space_uu_id": ""}} | {"data": {"company_uu_id": ""}}
|
||||
"""
|
||||
selection_dict = dict(
|
||||
request=cls.context_retriever.request,
|
||||
token_dict=cls.context_retriever.token,
|
||||
data=data,
|
||||
)
|
||||
if cls.context_retriever.token.is_employee:
|
||||
if Handlers.handle_employee_selection(
|
||||
request=cls.context_retriever.request,
|
||||
data=data,
|
||||
token_dict=cls.context_retriever.token,
|
||||
):
|
||||
if Handlers.handle_employee_selection(**selection_dict):
|
||||
return EndpointSuccessResponse(
|
||||
code="LOGIN_SELECT", lang=cls.context_retriever.token.lang
|
||||
).as_dict(
|
||||
data={"selected": data.company_uu_id, **cls.context_retriever.base}
|
||||
)
|
||||
elif cls.context_retriever.token.is_occupant:
|
||||
if Handlers.handle_occupant_selection(
|
||||
request=cls.context_retriever.request,
|
||||
data=data,
|
||||
token_dict=cls.context_retriever.token,
|
||||
):
|
||||
if Handlers.handle_occupant_selection(**selection_dict):
|
||||
return EndpointSuccessResponse(
|
||||
code="LOGIN_SELECT", lang=cls.context_retriever.token.lang
|
||||
).as_dict(
|
||||
|
||||
Reference in New Issue
Block a user