diff --git a/CHANGES.md b/CHANGES.md index c5887e7..134e616 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,11 +2,8 @@ ## [Unreleased] -<<<<<<< HEAD - Enable filter extension for `GET /items` requests and add `Queryables` links in `/collections` and `/collections/{collection_id}` responses ([#89](https://github.com/stac-utils/stac-fastapi-pgstac/pull/89)) -======= - Add collection search extension ->>>>>>> 9b2050a (add collection search extension) ## [3.0.0a4] - 2024-07-10 diff --git a/stac_fastapi/pgstac/core.py b/stac_fastapi/pgstac/core.py index ba85916..d6aeb1e 100644 --- a/stac_fastapi/pgstac/core.py +++ b/stac_fastapi/pgstac/core.py @@ -2,7 +2,7 @@ import re from typing import Any, Dict, List, Optional, Set, Union -from urllib.parse import unquote_plus +from urllib.parse import unquote_plus, urljoin import attr import orjson @@ -17,11 +17,12 @@ from stac_fastapi.extensions.core.collection_search.request import ( BaseCollectionSearchPostRequest, ) -from stac_fastapi.types.core import AsyncBaseCoreClient +from stac_fastapi.types.core import AsyncBaseCoreClient, Relations from stac_fastapi.types.errors import InvalidQueryParameter, NotFoundError +from stac_fastapi.types.requests import get_base_url from stac_fastapi.types.rfc3339 import DateTimeType from stac_fastapi.types.stac import Collection, Collections, Item, ItemCollection -from stac_pydantic.shared import BBox +from stac_pydantic.shared import BBox, MimeTypes from stac_fastapi.pgstac.config import Settings from stac_fastapi.pgstac.models.links import ( @@ -111,7 +112,7 @@ async def _collection_search_base( # noqa: C901 Returns: All collections which match the search criteria. """ - + base_url = get_base_url(request) search_request_json = search_request.model_dump_json( exclude_none=True, by_alias=True )