search filters and inspection polish
This commit is contained in:
parent
b8627c0e1d
commit
8d1e1ff583
6 changed files with 209 additions and 22 deletions
|
|
@ -768,9 +768,20 @@ def get_ability_map(
|
|||
@app.get("/search")
|
||||
def search(
|
||||
q: str,
|
||||
status: str | None = None,
|
||||
language: str | None = None,
|
||||
framework: str | None = None,
|
||||
service: RegistryService = Depends(get_service),
|
||||
) -> list[dict[str, object]]:
|
||||
return [asdict(result) for result in service.search(q)]
|
||||
return [
|
||||
asdict(result)
|
||||
for result in service.search(
|
||||
q,
|
||||
status=status,
|
||||
language=language,
|
||||
framework=framework,
|
||||
)
|
||||
]
|
||||
|
||||
|
||||
@app.get("/abilities")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue