From ad1fe5487c273ae079499e7c004f590bd6bff52a Mon Sep 17 00:00:00 2001 From: urec56 Date: Tue, 16 Jul 2024 19:15:49 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D1=81=D1=82=D0=B0?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2=D0=BA=D0=B0=20=D1=84=D0=B0=D0=B9=D0=BB=D0=BE?= =?UTF-8?q?=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/chat/router.py | 4 ++-- app/chat/websocket.py | 4 ++-- app/{users => }/dependencies.py | 0 app/images/router.py | 2 +- app/{utils/auth.py => services/auth_service.py} | 0 app/services/chat_service.py | 2 +- app/services/user_service.py | 2 +- app/tasks/tasks.py | 2 +- app/users/router.py | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) rename app/{users => }/dependencies.py (100%) rename app/{utils/auth.py => services/auth_service.py} (100%) diff --git a/app/chat/router.py b/app/chat/router.py index 0ec6f7c..e69f087 100644 --- a/app/chat/router.py +++ b/app/chat/router.py @@ -14,8 +14,8 @@ from app.chat.shemas import ( from app.services.chat_service import ChatService from app.services.message_service import MessageService from app.utils.unit_of_work import UnitOfWork -from app.users.dependencies import get_verificated_user -from app.utils.auth import AuthService +from app.dependencies import get_verificated_user +from app.services.auth_service import AuthService from app.users.schemas import SCreateInvitationLink, SUser router = APIRouter(prefix="/chat", tags=["Чат"]) diff --git a/app/chat/websocket.py b/app/chat/websocket.py index 845f938..1b521f1 100644 --- a/app/chat/websocket.py +++ b/app/chat/websocket.py @@ -9,10 +9,10 @@ from app.exceptions import IncorrectDataException from app.chat.exceptions import UserDontHavePermissionException from app.services.message_service import MessageService from app.utils.unit_of_work import UnitOfWork -from app.utils.auth import AuthService +from app.services.auth_service import AuthService from app.chat.router import router from app.chat.shemas import SSendMessage, SDeleteMessage, SEditMessage, SPinMessage, SUnpinMessage, Responses -from app.users.dependencies import get_current_user_ws, get_token, get_subprotocol_ws, get_verificated_user +from app.dependencies import get_current_user_ws, get_token, get_subprotocol_ws, get_verificated_user from app.users.schemas import SUser diff --git a/app/users/dependencies.py b/app/dependencies.py similarity index 100% rename from app/users/dependencies.py rename to app/dependencies.py diff --git a/app/images/router.py b/app/images/router.py index aaa50cc..401be93 100644 --- a/app/images/router.py +++ b/app/images/router.py @@ -2,7 +2,7 @@ from fastapi import APIRouter, UploadFile, status, Depends from app.images.shemas import SImageUrl, Responses from app.services.image_service import ImageService -from app.users.dependencies import get_verificated_user +from app.dependencies import get_verificated_user router = APIRouter(prefix="/images", tags=["Загрузка картинок"]) diff --git a/app/utils/auth.py b/app/services/auth_service.py similarity index 100% rename from app/utils/auth.py rename to app/services/auth_service.py diff --git a/app/services/chat_service.py b/app/services/chat_service.py index 686a6bb..668c6ce 100644 --- a/app/services/chat_service.py +++ b/app/services/chat_service.py @@ -6,7 +6,7 @@ from app.config import settings from app.services.user_service import UserService from app.utils.unit_of_work import UnitOfWork from app.users.schemas import SInvitationData -from app.utils.auth import AuthService +from app.services.auth_service import AuthService class ChatService: diff --git a/app/services/user_service.py b/app/services/user_service.py index 2269121..e3fb865 100644 --- a/app/services/user_service.py +++ b/app/services/user_service.py @@ -4,7 +4,7 @@ from app.tasks.tasks import generate_confirmation_code, send_confirmation_email, from app.utils.unit_of_work import UnitOfWork from app.users.exceptions import PasswordsMismatchException, WrongCodeException from app.users.schemas import SUser, SUsers, SUserRegister, SConfirmationData, SUserAvatars, SUserChangeData -from app.utils.auth import AuthService +from app.services.auth_service import AuthService class UserService: diff --git a/app/tasks/tasks.py b/app/tasks/tasks.py index dfb21a6..b10c728 100644 --- a/app/tasks/tasks.py +++ b/app/tasks/tasks.py @@ -13,7 +13,7 @@ from app.tasks.email_templates import ( create_data_change_confirmation_email, create_data_change_email, ) -from app.utils.auth import AuthService +from app.services.auth_service import AuthService from app.users.schemas import SConfirmationData diff --git a/app/users/router.py b/app/users/router.py index a8b5287..63586cc 100644 --- a/app/users/router.py +++ b/app/users/router.py @@ -5,8 +5,8 @@ from fastapi import APIRouter, Depends, status from app.services.user_service import UserService from app.users.exceptions import UserAlreadyExistsException, PasswordAlreadyInUseException, UserNotFoundException from app.utils.unit_of_work import UnitOfWork -from app.utils.auth import AuthService -from app.users.dependencies import get_current_user +from app.services.auth_service import AuthService +from app.dependencies import get_current_user from app.users.schemas import ( SUserLogin, SUserRegister,