appender events and applications are updated
This commit is contained in:
@@ -5,7 +5,11 @@ from ApiControllers.abstracts.default_validations import CommonHeaders
|
||||
from ApiControllers.providers.token_provider import TokenProvider
|
||||
from Controllers.Postgres.pagination import PaginateOnly, Pagination, PaginationResult
|
||||
from Controllers.Postgres.response import EndpointResponse
|
||||
from Validations.service_endpoints.validations import Event2Employee, Event2Occupant, AddRemoveService
|
||||
from Validations.service_endpoints.validations import (
|
||||
Event2Employee,
|
||||
Event2Occupant,
|
||||
AddRemoveService,
|
||||
)
|
||||
from Events.event_endpoints.cluster import EventsEndpointRouterCluster
|
||||
|
||||
# Create API router
|
||||
@@ -50,7 +54,7 @@ def event_list_appended_route(
|
||||
FoundCluster = EventsEndpointRouterCluster.get_event_cluster("EventsListAppended")
|
||||
event_cluster_matched = FoundCluster.match_event(event_key=event_key)
|
||||
return event_cluster_matched.event_callable(list_options=data)
|
||||
|
||||
|
||||
|
||||
@event_endpoint_route.post(
|
||||
path="/register/service",
|
||||
@@ -87,7 +91,9 @@ def event_unregister_service_route(
|
||||
token_object = TokenProvider.get_dict_from_redis(token=headers.token)
|
||||
event_founder_dict = dict(endpoint_code=headers.operation_id, token=token_object)
|
||||
event_key = TokenProvider.retrieve_event_codes(**event_founder_dict)
|
||||
FoundCluster = EventsEndpointRouterCluster.get_event_cluster("EventUnregisterService")
|
||||
FoundCluster = EventsEndpointRouterCluster.get_event_cluster(
|
||||
"EventUnregisterService"
|
||||
)
|
||||
event_cluster_matched = FoundCluster.match_event(event_key=event_key)
|
||||
return event_cluster_matched.event_callable(data=data)
|
||||
|
||||
@@ -107,7 +113,9 @@ def event_bind_employee_extra_route(
|
||||
token_object = TokenProvider.get_dict_from_redis(token=headers.token)
|
||||
event_founder_dict = dict(endpoint_code=headers.operation_id, token=token_object)
|
||||
event_key = TokenProvider.retrieve_event_codes(**event_founder_dict)
|
||||
FoundCluster = EventsEndpointRouterCluster.get_event_cluster("EventBindEmployeeExtra")
|
||||
FoundCluster = EventsEndpointRouterCluster.get_event_cluster(
|
||||
"EventBindEmployeeExtra"
|
||||
)
|
||||
event_cluster_matched = FoundCluster.match_event(event_key=event_key)
|
||||
return event_cluster_matched.event_callable(data=data)
|
||||
|
||||
@@ -127,6 +135,8 @@ def event_bind_occupant_extra_route(
|
||||
token_object = TokenProvider.get_dict_from_redis(token=headers.token)
|
||||
event_founder_dict = dict(endpoint_code=headers.operation_id, token=token_object)
|
||||
event_key = TokenProvider.retrieve_event_codes(**event_founder_dict)
|
||||
FoundCluster = EventsEndpointRouterCluster.get_event_cluster("EventBindOccupantExtra")
|
||||
FoundCluster = EventsEndpointRouterCluster.get_event_cluster(
|
||||
"EventBindOccupantExtra"
|
||||
)
|
||||
event_cluster_matched = FoundCluster.match_event(event_key=event_key)
|
||||
return event_cluster_matched.event_callable(data=data)
|
||||
|
||||
Reference in New Issue
Block a user