Skip to content

Commit 96ee531

Browse files
committed
doing things weird
1 parent df6b6a0 commit 96ee531

File tree

2 files changed

+8
-5
lines changed
  • packages/models-library/src/models_library/api_schemas_webserver
  • services/storage/src/simcore_service_storage/api/rest

2 files changed

+8
-5
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from datetime import datetime
22
from pathlib import Path
3-
from typing import Annotated, Any, Final, TypeVar
3+
from typing import Annotated, Any, Final, TypeAlias, TypeVar
44

55
from fastapi import Query
66
from fastapi_pagination.cursor import CursorPage
@@ -36,6 +36,7 @@
3636
)
3737
),
3838
]
39+
CustomizedPathsCursorPageParams: TypeAlias = CustomizedPathsCursorPage.__params_type__ # type: ignore
3940

4041

4142
class StorageLocationPathParams(BaseModel):

services/storage/src/simcore_service_storage/api/rest/_paths.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33
from typing import Annotated
44

55
from fastapi import APIRouter, Depends
6-
from fastapi_pagination import create_page, resolve_params
6+
from fastapi_pagination import create_page
77
from models_library.api_schemas_storage.storage_schemas import PathMetaDataGet
8-
from models_library.api_schemas_webserver.storage import CustomizedPathsCursorPage
8+
from models_library.api_schemas_webserver.storage import (
9+
CustomizedPathsCursorPage,
10+
CustomizedPathsCursorPageParams,
11+
)
912
from models_library.users import UserID
1013

1114
from ...dsm_factory import BaseDataManager
@@ -25,13 +28,12 @@
2528
response_model=CustomizedPathsCursorPage[PathMetaDataGet],
2629
)
2730
async def list_paths(
28-
page_params: Annotated[CustomizedPathsCursorPage.__params_type__, Depends()],
31+
page_params: Annotated[CustomizedPathsCursorPageParams, Depends()],
2932
dsm: Annotated[BaseDataManager, Depends(get_data_manager)],
3033
user_id: UserID,
3134
file_filter: Path | None = None,
3235
):
3336
"""Returns one level of files (paginated)"""
34-
page_params = resolve_params()
3537
items, next_cursor, total_number = await dsm.list_paths(
3638
user_id=user_id,
3739
file_filter=file_filter,

0 commit comments

Comments
 (0)