appender events and applications are updated
This commit is contained in:
@@ -21,13 +21,17 @@ def service_endpoint_list_callable(data: PaginateOnly):
|
||||
list_options = PaginateOnly(**data.model_dump())
|
||||
with Services.new_session() as db_session:
|
||||
if data.query:
|
||||
services_list = Services.filter_all_system(*Services.convert(data.query), db=db_session)
|
||||
services_list = Services.filter_all_system(
|
||||
*Services.convert(data.query), db=db_session
|
||||
)
|
||||
else:
|
||||
services_list = Services.filter_all_system(db=db_session)
|
||||
pagination = Pagination(data=services_list)
|
||||
pagination.change(**data.model_dump())
|
||||
pagination_result = PaginationResult(data=services_list, pagination=pagination)
|
||||
return EndpointResponse(message="MSG0003-LIST", pagination_result=pagination_result).response
|
||||
return EndpointResponse(
|
||||
message="MSG0003-LIST", pagination_result=pagination_result
|
||||
).response
|
||||
|
||||
|
||||
ServiceEndpointListEvent.event_callable = service_endpoint_list_callable
|
||||
@@ -49,13 +53,17 @@ def service_endpoint_to_events_callable(data: PaginateOnly):
|
||||
list_options = PaginateOnly(**data.model_dump())
|
||||
with Service2Events.new_session() as db_session:
|
||||
if data.query:
|
||||
services_list = Service2Events.filter_all_system(*Service2Events.convert(data.query), db=db_session)
|
||||
services_list = Service2Events.filter_all_system(
|
||||
*Service2Events.convert(data.query), db=db_session
|
||||
)
|
||||
else:
|
||||
services_list = Service2Events.filter_all_system(db=db_session)
|
||||
pagination = Pagination(data=services_list)
|
||||
pagination.change(**data.model_dump())
|
||||
pagination_result = PaginationResult(data=services_list, pagination=pagination)
|
||||
return EndpointResponse(message="MSG0003-LIST", pagination_result=pagination_result).response
|
||||
return EndpointResponse(
|
||||
message="MSG0003-LIST", pagination_result=pagination_result
|
||||
).response
|
||||
|
||||
|
||||
ServiceEndpointToEventsEvent.event_callable = service_endpoint_to_events_callable
|
||||
|
||||
Reference in New Issue
Block a user