Skip to content

Commit

Permalink
Secure content-search behind oauth flow
Browse files Browse the repository at this point in the history
  • Loading branch information
AulonSal committed Jul 13, 2021
1 parent 91971ab commit d86a17c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion steward_fastapi/core/routers/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async def get_sources(token: str = Depends(oauth2_scheme)):


@router.get("/search", response_model=list[data.ContentOut])
async def search_endpoint(string: str, _type: Optional[str] = None, source: Optional[str] = None):
async def search_endpoint(string: str, _type: Optional[str] = None, source: Optional[str] = None, token: str = Depends(oauth2_scheme)):
try:
return await data.ContentOut.from_queryset(search_content_query(string, _type, source))
except ValueError as exception:
Expand Down

0 comments on commit d86a17c

Please sign in to comment.