Skip to content

Commit 3357caf

Browse files
authored
Merge branch 'main' into 29-добавить-софт-делиты-в-принтер-1
2 parents f175205 + 9b1ff25 commit 3357caf

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

print_service/routes/file.py

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import aiofiles
66
import aiofiles.os
7-
from auth_lib.fastapi import UnionAuth
87
from fastapi import APIRouter, File, UploadFile
98
from fastapi.exceptions import HTTPException
109
from fastapi.params import Depends
@@ -165,10 +164,7 @@ async def send(inp: SendInput, settings: Settings = Depends(get_settings)):
165164
response_model=SendOutput,
166165
)
167166
async def upload_file(
168-
pin: str,
169-
file: UploadFile = File(...),
170-
settings: Settings = Depends(get_settings),
171-
_=Depends(UnionAuth(scopes=["print.file.create"], allow_none=False, auto_error=True)),
167+
pin: str, file: UploadFile = File(...), settings: Settings = Depends(get_settings)
172168
):
173169
"""Загрузить файл на сервер.
174170
@@ -239,10 +235,7 @@ async def upload_file(
239235
response_model=SendOutput,
240236
)
241237
async def update_file_options(
242-
pin: str,
243-
inp: SendInputUpdate,
244-
settings: Settings = Depends(get_settings),
245-
_=Depends(UnionAuth(scopes=["print.file.update"], allow_none=False, auto_error=True)),
238+
pin: str, inp: SendInputUpdate, settings: Settings = Depends(get_settings)
246239
):
247240
"""Обновляет настройки печати.
248241
@@ -289,11 +282,7 @@ async def update_file_options(
289282
},
290283
response_model=ReceiveOutput,
291284
)
292-
async def print_file(
293-
pin: str,
294-
settings: Settings = Depends(get_settings),
295-
_=Depends(UnionAuth(scopes=["print.file.get"], allow_none=False, auto_error=True)),
296-
):
285+
async def print_file(pin: str, settings: Settings = Depends(get_settings)):
297286
"""Получить файл для печати.
298287
299288
Требует пин-код, полученный в методе POST `/file`. Файл можно скачать

0 commit comments

Comments
 (0)