fix: Standardize endpoint paths in files v2 API (#7595)
fix: standardize endpoint paths in files API Updated the file API routes to include trailing slashes for consistency. This change affects the upload, list, and delete endpoints, ensuring they all follow the same URL structure.
This commit is contained in:
parent
057e272e6e
commit
2b2226ffb9
1 changed files with 3 additions and 0 deletions
|
|
@ -42,6 +42,7 @@ async def fetch_file_object(file_id: uuid.UUID, current_user: CurrentActiveUser,
|
|||
|
||||
|
||||
@router.post("", status_code=HTTPStatus.CREATED)
|
||||
@router.post("/", status_code=HTTPStatus.CREATED)
|
||||
async def upload_user_file(
|
||||
file: Annotated[UploadFile, File(...)],
|
||||
session: DbSession,
|
||||
|
|
@ -142,6 +143,7 @@ async def upload_user_file(
|
|||
|
||||
|
||||
@router.get("")
|
||||
@router.get("/", status_code=HTTPStatus.OK)
|
||||
async def list_files(
|
||||
current_user: CurrentActiveUser,
|
||||
session: DbSession,
|
||||
|
|
@ -239,6 +241,7 @@ async def delete_file(
|
|||
|
||||
|
||||
@router.delete("")
|
||||
@router.delete("/", status_code=HTTPStatus.OK)
|
||||
async def delete_all_files(
|
||||
current_user: CurrentActiveUser,
|
||||
session: DbSession,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue