Added repos to startup

This commit is contained in:
Sven Heidemann 2021-12-02 17:41:44 +01:00
parent 2c29b45f5a
commit 0fd99cc6ba
2 changed files with 4 additions and 1 deletions

View File

@ -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)

View File

@ -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