Skip to content

Commit 56ebc70

Browse files
committed
initial
1 parent 1c829d7 commit 56ebc70

File tree

2 files changed

+17
-0
lines changed
  • api/specs/web-server
  • packages/models-library/src/models_library/api_schemas_webserver

2 files changed

+17
-0
lines changed

api/specs/web-server/_storage.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
PresignedLink,
2323
)
2424
from models_library.api_schemas_webserver.storage import (
25+
BatchDeletePathsBodyParams,
2526
DataExportPost,
2627
ListPathsQueryParams,
2728
StorageLocationPathParams,
@@ -173,6 +174,18 @@ async def delete_file(location_id: LocationID, file_id: StorageFileIDStr):
173174
"""deletes file if user has the rights to"""
174175

175176

177+
@router.post(
178+
"/storage/locations/{location_id}/-/files:batchDelete",
179+
status_code=status.HTTP_204_NO_CONTENT,
180+
description="Deletes Files",
181+
)
182+
async def batch_delete_files(
183+
_path: Annotated[StorageLocationPathParams, Depends()],
184+
_body: Annotated[BatchDeletePathsBodyParams, Depends()],
185+
):
186+
"""deletes file if user has the rights to"""
187+
188+
176189
@router.post(
177190
"/storage/locations/{location_id}/files/{file_id}:abort",
178191
status_code=status.HTTP_204_NO_CONTENT,

packages/models-library/src/models_library/api_schemas_webserver/storage.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ class ListPathsQueryParams(InputSchema, CursorQueryParameters):
3636
] = DEFAULT_NUMBER_OF_PATHS_PER_PAGE
3737

3838

39+
class BatchDeletePathsBodyParams(InputSchema):
40+
paths: set[Path]
41+
42+
3943
class DataExportPost(InputSchema):
4044
paths: list[StorageFileID]
4145

0 commit comments

Comments
 (0)