login tested updated
This commit is contained in:
@@ -26,6 +26,7 @@ from .function_handlers import (
|
||||
)
|
||||
|
||||
|
||||
|
||||
# Auth Login
|
||||
authentication_login_super_user_event = Event(
|
||||
name="authentication_login_super_user_event",
|
||||
|
||||
@@ -46,15 +46,16 @@ AuthenticationLoginEventMethods = MethodToEvent(
|
||||
description="Login to the system via domain, access key : [email] | [phone]",
|
||||
)
|
||||
|
||||
def authentication_login_with_domain_and_creds(
|
||||
def authentication_login_with_domain_and_creds_endpoint(
|
||||
request: Request,
|
||||
data: EndpointBaseRequestModel,
|
||||
) -> Dict[str, Any]:
|
||||
function = AuthenticationLoginEventMethods.retrieve_event(event_function_code=f"{authentication_login_super_user_event.key}")
|
||||
return function.endpoint_callable(request=request, data=data)
|
||||
event_2_catch = AuthenticationLoginEventMethods.retrieve_event(event_function_code=f"{authentication_login_super_user_event.key}")
|
||||
data = event_2_catch.REQUEST_VALIDATOR(**data.data)
|
||||
return event_2_catch.endpoint_callable(request=request, data=data)
|
||||
|
||||
|
||||
AuthenticationLoginEventMethods.endpoint_callable = authentication_login_with_domain_and_creds
|
||||
AuthenticationLoginEventMethods.endpoint_callable = authentication_login_with_domain_and_creds_endpoint
|
||||
|
||||
AuthenticationSelectEventMethods = MethodToEvent(
|
||||
name="AuthenticationSelectEventMethods",
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
from pydantic import BaseModel
|
||||
from ApiLayers.ApiValidations.Request import (
|
||||
Login,
|
||||
)
|
||||
|
||||
|
||||
class LoginSuperUserRequestModel(BaseModel):
|
||||
class LoginSuperUserRequestModel(Login):
|
||||
pass
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user