Skip to content

Commit a61b258

Browse files
committed
Use sync endpoints
1 parent 9e11ac9 commit a61b258

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/mb/app/jp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def _parse_archive(
9898

9999
# noinspection DuplicatedCode
100100
@router.post("/upload", status_code=HTTPStatus.ACCEPTED, response_model=UploadResponse)
101-
async def upload_archive(
101+
def upload_archive(
102102
archives: list[UploadFile],
103103
tasks: BackgroundTasks,
104104
user: User = Depends(is_active),

src/mb/app/main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,12 @@ async def profile_request(request, call_next):
105105

106106

107107
@app.get("/", response_class=RedirectResponse)
108-
async def redirect_to_docs():
108+
def redirect_to_docs():
109109
return "/docs"
110110

111111

112112
@app.get("/alive", tags=["status"])
113-
async def alive():
113+
def alive():
114114
return {"message": "I'm alive!"}
115115

116116

@@ -445,12 +445,12 @@ def validate_path(file_path: str):
445445

446446

447447
@app.get("/access/{file_path:path}", tags=["misc"], response_class=FileResponse)
448-
async def download_file(file_path: str):
448+
def download_file(file_path: str):
449449
return FileResponse(validate_path(file_path))
450450

451451

452452
@app.delete("/access/{file_path:path}", tags=["misc"])
453-
async def delete_file(file_path: str, user: User = Depends(is_active)):
453+
def delete_file(file_path: str, user: User = Depends(is_active)):
454454
if not user.can_delete:
455455
raise HTTPException(
456456
HTTPStatus.UNAUTHORIZED, detail="User is not allowed to delete files."

src/mb/app/nz.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def _parse_archive(
9898

9999
# noinspection DuplicatedCode
100100
@router.post("/upload", status_code=HTTPStatus.ACCEPTED, response_model=UploadResponse)
101-
async def upload_archive(
101+
def upload_archive(
102102
archives: list[UploadFile],
103103
tasks: BackgroundTasks,
104104
user: User = Depends(is_active),

0 commit comments

Comments
 (0)