Skip to content

Commit

Permalink
get token from kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
jonhealy1 committed Aug 3, 2024
1 parent f7d6884 commit 6024840
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion stac_fastapi/core/stac_fastapi/core/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ async def item_collection(
bbox: Optional[BBox] = None,
datetime: Optional[DateTimeType] = None,
limit: int = 10,
token: str = None,
token: Optional[str] = None,
**kwargs,
) -> stac_types.ItemCollection:
"""Read items from a specific collection in the database.
Expand All @@ -302,6 +302,8 @@ async def item_collection(
Exception: If any error occurs while reading the items from the database.
"""
request: Request = kwargs["request"]
token = request.query_params.get('token')

base_url = str(request.base_url)

collection = await self.get_collection(
Expand Down

0 comments on commit 6024840

Please sign in to comment.