Skip to content

Commit

Permalink
Registry and async update_collection fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysrevans3 committed Mar 25, 2024
1 parent 168efb1 commit f746cff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def register_update_collection(self):
response_model_exclude_none=True,
methods=["PUT"],
endpoint=create_async_endpoint(
self.client.update_collection, CollectionUri, stac_types.Collection
self.client.update_collection, stac_types.Collection
),
)

Expand Down
9 changes: 5 additions & 4 deletions stac_fastapi/types/stac_fastapi/types/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,17 +215,18 @@ async def create_collection(

@abc.abstractmethod
async def update_collection(
self, collection: stac_types.Collection, **kwargs
self, collection_id: str, collection: stac_types.Collection, **kwargs
) -> Optional[Union[stac_types.Collection, Response]]:
"""Perform a complete update on an existing collection.
Called with `PUT /collections`. It is expected that this item already
exists. The update should do a diff against the saved collection and
Called with `PUT /collections/{collection_id}`. It is expected that this item
already exists. The update should do a diff against the saved collection and
perform any necessary updates. Partial updates are not supported by the
transactions extension.
Args:
collection: the collection (must be complete)
collection_id: id of the existing collection to be updated
collection: the updated collection (must be complete)
Returns:
The updated collection.
Expand Down

0 comments on commit f746cff

Please sign in to comment.