diff --git a/src/core/main.py b/src/core/main.py index dad0530..caeb799 100644 --- a/src/core/main.py +++ b/src/core/main.py @@ -1,6 +1,6 @@ from src.modules.standard.config.config import get_config from src.modules.standard.database.models.base import database -from src.modules.standard.database.api import connect_database +from src.modules.standard.database.db_api import connect_database from asyncio import run from aiogram import Bot, Dispatcher diff --git a/src/modules/standard/config/config.py b/src/modules/standard/config/config.py index 49e37da..c58ba57 100644 --- a/src/modules/standard/config/config.py +++ b/src/modules/standard/config/config.py @@ -22,4 +22,7 @@ def get_yandexgpt_catalog_id() -> str: def get_yandexgpt_prompt() -> str: return get_config()["YANDEX_GPT_PROMPT"] +def get_access_rights() -> dict: + return get_config()["ACCESS_RIGHTS"] + diff --git a/src/modules/standard/database/__init__.py b/src/modules/standard/database/__init__.py index dcf9355..f336d57 100644 --- a/src/modules/standard/database/__init__.py +++ b/src/modules/standard/database/__init__.py @@ -1 +1 @@ -from . import api, models \ No newline at end of file +from . import db_api, models \ No newline at end of file diff --git a/src/modules/standard/database/tests/test_db.py b/src/modules/standard/database/tests/test_db.py index a44f86d..e858981 100644 --- a/src/modules/standard/database/tests/test_db.py +++ b/src/modules/standard/database/tests/test_db.py @@ -1,7 +1,7 @@ import unittest import os -from ..api import * +from ..db_api import * from ...exceptions.module_exceptions import MissingModuleName, NotExpectedModuleName diff --git a/src/modules/standard/roles/roles.py b/src/modules/standard/roles/roles.py index 928abfa..0421787 100644 --- a/src/modules/standard/roles/roles.py +++ b/src/modules/standard/roles/roles.py @@ -1,4 +1,4 @@ -from ..database.api import get_user_role +from ..database.db_api import get_user_role from ..config.config import get_config yaml_load = get_config() diff --git a/src/modules/standard/roles/tests/test_roles.py b/src/modules/standard/roles/tests/test_roles.py index 7748e81..2131a3b 100644 --- a/src/modules/standard/roles/tests/test_roles.py +++ b/src/modules/standard/roles/tests/test_roles.py @@ -1,7 +1,7 @@ import os import unittest -from ...database.api import create_tables, connect_database, add_user -from ..api import Roles +from ...database.db_api import create_tables, connect_database, add_user +from ..roles import Roles class TestRoles(unittest.IsolatedAsyncioTestCase):