From 218dcce4ba2c957855804c7a06e7b2c941a0678e Mon Sep 17 00:00:00 2001 From: Svetlana <164897708+svetleo-evidently@users.noreply.github.com> Date: Tue, 27 Aug 2024 17:55:26 +0200 Subject: [PATCH] get_api_route_handelers fix (#1266) --- src/evidently/ui/components/base.py | 4 ++-- src/evidently/ui/local_service.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/evidently/ui/components/base.py b/src/evidently/ui/components/base.py index 782f247520..310703294f 100644 --- a/src/evidently/ui/components/base.py +++ b/src/evidently/ui/components/base.py @@ -78,14 +78,14 @@ def get_middlewares(self, ctx: ComponentContext): def get_route_handlers(self, ctx: ComponentContext): return [] - def get_api_route_handelers(self, ctx: ComponentContext): + def get_api_route_handlers(self, ctx: ComponentContext): return [] def apply(self, ctx: ComponentContext, builder: AppBuilder): builder.dependencies.update(self.get_dependencies(ctx)) builder.middlewares.extend(self.get_middlewares(ctx)) builder.route_handlers.extend(self.get_route_handlers(ctx)) - builder.api_route_handlers.extend(self.get_api_route_handelers(ctx)) + builder.api_route_handlers.extend(self.get_api_route_handlers(ctx)) def finalize(self, ctx: ComponentContext, app: Litestar): pass diff --git a/src/evidently/ui/local_service.py b/src/evidently/ui/local_service.py index c48ab119c6..2cdd02519b 100644 --- a/src/evidently/ui/local_service.py +++ b/src/evidently/ui/local_service.py @@ -28,7 +28,7 @@ def evidently_service_exception_handler(_: Request, exc: EvidentlyServiceError) class LocalServiceComponent(ServiceComponent): debug: bool = False - def get_api_route_handelers(self, ctx: ComponentContext): + def get_api_route_handlers(self, ctx: ComponentContext): guard = ctx.get_component(SecurityComponent).get_auth_guard() return [create_projects_api(guard), service_api()]