Skip to content

Commit 9b1ff25

Browse files
authored
Revert "Защита ручки GET /file/{pin}" (#89)
Откатываем, чтобы спасти прод. Потом вернем @Temmmmmo Reverts #86
1 parent 909ca5a commit 9b1ff25

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
@@ -160,10 +159,7 @@ async def send(inp: SendInput, settings: Settings = Depends(get_settings)):
160159
response_model=SendOutput,
161160
)
162161
async def upload_file(
163-
pin: str,
164-
file: UploadFile = File(...),
165-
settings: Settings = Depends(get_settings),
166-
_=Depends(UnionAuth(scopes=["print.file.create"], allow_none=False, auto_error=True)),
162+
pin: str, file: UploadFile = File(...), settings: Settings = Depends(get_settings)
167163
):
168164
"""Загрузить файл на сервер.
169165
@@ -233,10 +229,7 @@ async def upload_file(
233229
response_model=SendOutput,
234230
)
235231
async def update_file_options(
236-
pin: str,
237-
inp: SendInputUpdate,
238-
settings: Settings = Depends(get_settings),
239-
_=Depends(UnionAuth(scopes=["print.file.update"], allow_none=False, auto_error=True)),
232+
pin: str, inp: SendInputUpdate, settings: Settings = Depends(get_settings)
240233
):
241234
"""Обновляет настройки печати.
242235
@@ -282,11 +275,7 @@ async def update_file_options(
282275
},
283276
response_model=ReceiveOutput,
284277
)
285-
async def print_file(
286-
pin: str,
287-
settings: Settings = Depends(get_settings),
288-
_=Depends(UnionAuth(scopes=["print.file.get"], allow_none=False, auto_error=True)),
289-
):
278+
async def print_file(pin: str, settings: Settings = Depends(get_settings)):
290279
"""Получить файл для печати.
291280
292281
Требует пин-код, полученный в методе POST `/file`. Файл можно скачать

0 commit comments

Comments
 (0)