Skip to content

Commit b9d71c2

Browse files
committed
add /collections-search to landing page
1 parent b2cf5f1 commit b9d71c2

File tree

1 file changed

+14
-7
lines changed
  • stac_fastapi/core/stac_fastapi/core

1 file changed

+14
-7
lines changed

stac_fastapi/core/stac_fastapi/core/core.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,20 @@ def _landing_page(
136136
"href": urljoin(base_url, "search"),
137137
"method": "POST",
138138
},
139+
{
140+
"rel": "collections-search",
141+
"type": "application/json",
142+
"title": "Collections Search",
143+
"href": urljoin(base_url, "collections-search"),
144+
"method": "GET",
145+
},
146+
{
147+
"rel": "collections-search",
148+
"type": "application/json",
149+
"title": "Collections Search",
150+
"href": urljoin(base_url, "collections-search"),
151+
"method": "POST",
152+
},
139153
],
140154
stac_extensions=extension_schemas,
141155
)
@@ -311,7 +325,6 @@ async def all_collections(
311325
if parsed_sort:
312326
sort = parsed_sort
313327

314-
# sort is now ready for use
315328
# Convert q to a list if it's a string
316329
q_list = None
317330
if q is not None:
@@ -371,12 +384,6 @@ async def all_collections(
371384
status_code=400, detail=f"Error parsing filter: {e}"
372385
)
373386

374-
# # Handle both cql2-json and cql2-text
375-
# parsed_filter = orjson.loads(
376-
# unquote_plus(filter_expr)
377-
# if filter_lang == "cql2-json" or filter_lang is None
378-
# else to_cql2(parse_cql2_text(filter_expr))
379-
# )
380387
except Exception as e:
381388
raise HTTPException(
382389
status_code=400, detail=f"Invalid filter parameter: {e}"

0 commit comments

Comments
 (0)