Skip to content

Commit

Permalink
change '/content_base/search' method to POST
Browse files Browse the repository at this point in the history
  • Loading branch information
AlisoSouza committed Jan 8, 2024
1 parent bd060b1 commit f926550
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/handlers/content_bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def __init__(self, content_base_indexer: IDocumentIndexer):
"/content_base/index", endpoint=self.index, methods=["PUT"]
)
self.router.add_api_route(
"/content_base/search", endpoint=self.search, methods=["GET"]
"/content_base/search", endpoint=self.search, methods=["POST"]
)
self.router.add_api_route(
"/content_base/delete", endpoint=self.delete, methods=["DELETE"]
Expand Down Expand Up @@ -81,6 +81,8 @@ def delete_batch(self):
raise NotImplementedError

def search(self, request: ContentBaseSearchRequest, Authorization: Annotated[str | None, Header()] = None):
from fastapi.logger import logger
logger.error(ContentBaseSearchRequest)
token_verification(Authorization)
response = self.content_base_indexer.search(
search=request.search.lower(),
Expand Down

0 comments on commit f926550

Please sign in to comment.