tested appender service to events

This commit is contained in:
2025-05-04 21:24:29 +03:00
parent 0cde34a9bc
commit dd707b2463
30 changed files with 1167 additions and 277 deletions

View File

@@ -23,17 +23,24 @@ class RouteRegisterController:
for route_method in [
method.lower() for method in getattr(route, "methods")
]:
restriction = EndpointRestriction.find_or_create(
add_or_update_dict = dict(
endpoint_method=route_method,
endpoint_name=route_path,
endpoint_desc=route_summary.replace("_", " "),
endpoint_function=route_summary,
operation_uu_id=operation_id, # UUID of the endpoint
operation_uu_id=operation_id,
is_confirmed=True,
db=db_session,
)
if restriction.meta_data.created:
restriction.save(db=db_session)
endpoint_restriction_found = EndpointRestriction.filter_one_system(
EndpointRestriction.operation_uu_id == operation_id, db=db_session,
).data
if endpoint_restriction_found:
endpoint_restriction_found.update(**add_or_update_dict, db=db_session)
endpoint_restriction_found.save(db=db_session)
else:
restriction = EndpointRestriction.find_or_create(**add_or_update_dict, db=db_session)
if restriction.meta_data.created:
restriction.save(db=db_session)
def register_routes(self):
for router in self.router_list: