From fdcfe1e04e6a237a3560474746f3de615f3d1e65 Mon Sep 17 00:00:00 2001 From: Mark Arzangulyan <15670678+Arzangulyan@users.noreply.github.com> Date: Fri, 27 Dec 2024 12:00:50 +0300 Subject: [PATCH] =?UTF-8?q?Revert=20"=D0=97=D0=B0=D1=89=D0=B8=D1=82=D0=B0?= =?UTF-8?q?=20=D1=80=D1=83=D1=87=D0=BA=D0=B8=20GET=20/file/{pin}=20(#86)"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 909ca5a21f1eea5575fdf916932734468c7833a5. --- print_service/routes/file.py | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/print_service/routes/file.py b/print_service/routes/file.py index 1153efd..5205e0f 100644 --- a/print_service/routes/file.py +++ b/print_service/routes/file.py @@ -4,7 +4,6 @@ import aiofiles import aiofiles.os -from auth_lib.fastapi import UnionAuth from fastapi import APIRouter, File, UploadFile from fastapi.exceptions import HTTPException from fastapi.params import Depends @@ -160,10 +159,7 @@ async def send(inp: SendInput, settings: Settings = Depends(get_settings)): response_model=SendOutput, ) async def upload_file( - pin: str, - file: UploadFile = File(...), - settings: Settings = Depends(get_settings), - _=Depends(UnionAuth(scopes=["print.file.create"], allow_none=False, auto_error=True)), + pin: str, file: UploadFile = File(...), settings: Settings = Depends(get_settings) ): """Загрузить файл на сервер. @@ -233,10 +229,7 @@ async def upload_file( response_model=SendOutput, ) async def update_file_options( - pin: str, - inp: SendInputUpdate, - settings: Settings = Depends(get_settings), - _=Depends(UnionAuth(scopes=["print.file.update"], allow_none=False, auto_error=True)), + pin: str, inp: SendInputUpdate, settings: Settings = Depends(get_settings) ): """Обновляет настройки печати. @@ -282,11 +275,7 @@ async def update_file_options( }, response_model=ReceiveOutput, ) -async def print_file( - pin: str, - settings: Settings = Depends(get_settings), - _=Depends(UnionAuth(scopes=["print.file.get"], allow_none=False, auto_error=True)), -): +async def print_file(pin: str, settings: Settings = Depends(get_settings)): """Получить файл для печати. Требует пин-код, полученный в методе POST `/file`. Файл можно скачать