From 0fd99cc6bae089a6fd9d63c21c7c700a5d94cd1c Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 2 Dec 2021 17:41:44 +0100 Subject: [PATCH] Added repos to startup --- src/gismo/startup.py | 3 +++ src/gismo_data/service/known_user_repository_service.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gismo/startup.py b/src/gismo/startup.py index 4ddd38d..307aa35 100644 --- a/src/gismo/startup.py +++ b/src/gismo/startup.py @@ -14,11 +14,13 @@ from gismo_core.abc.bot_service_abc import BotServiceABC from gismo_core.abc.message_service_abc import MessageServiceABC from gismo_core.service.bot_service import BotService from gismo_core.service.message_service import MessageService +from gismo_data.abc.known_user_repository_abc import KnownUserRepositoryABC from gismo_data.abc.server_repository_abc import ServerRepositoryABC from gismo_data.abc.user_repository_abc import UserRepositoryABC from gismo_data.db_context import DBContext from gismo_data.service.client_repository_service import ( ClientRepositoryABC, ClientRepositoryService) +from gismo_data.service.known_user_repository_service import KnownUserRepositoryService from gismo_data.service.server_repository_service import \ ServerRepositoryService from gismo_data.service.user_repository_service import UserRepositoryService @@ -63,6 +65,7 @@ class Startup(StartupABC): services.add_transient(ServerRepositoryABC, ServerRepositoryService) services.add_transient(UserRepositoryABC, UserRepositoryService) services.add_transient(ClientRepositoryABC, ClientRepositoryService) + services.add_transient(KnownUserRepositoryABC, KnownUserRepositoryService) services.add_transient(ModuleABC, Database) services.add_transient(ModuleABC, Base) diff --git a/src/gismo_data/service/known_user_repository_service.py b/src/gismo_data/service/known_user_repository_service.py index f9a30e5..738597f 100644 --- a/src/gismo_data/service/known_user_repository_service.py +++ b/src/gismo_data/service/known_user_repository_service.py @@ -8,7 +8,7 @@ from gismo_data.abc.user_repository_abc import UserRepositoryABC from gismo_data.model.known_user import KnownUser -class UserRepositoryService(UserRepositoryABC): +class KnownUserRepositoryService(UserRepositoryABC): def __init__(self, logger: LoggerABC, db_context: DatabaseContextABC, servers: ServerRepositoryABC): self._logger = logger