Skip to content

Commit 5b93b79

Browse files
committed
Limit query param for search journal endpoint
1 parent 27ac6f6 commit 5b93b79

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

bugout/app.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,13 +568,16 @@ def search(
568568
token: Union[str, uuid.UUID],
569569
journal_id: Union[str, uuid.UUID],
570570
query: str,
571+
filters: List[str] = [],
571572
limit: int = 10,
572573
offset: int = 0,
573574
content: bool = True,
574575
timeout: float = REQUESTS_TIMEOUT,
575576
) -> data.BugoutSearchResults:
576577
self.journal.timeout = timeout
577-
return self.journal.search(token, journal_id, query, limit, offset, content)
578+
return self.journal.search(
579+
token, journal_id, query, filters, limit, offset, content
580+
)
578581

579582
# Humbug
580583
def get_humbug_integrations(

bugout/journal.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ def search(
381381
token: Union[str, uuid.UUID],
382382
journal_id: Union[str, uuid.UUID],
383383
query: str,
384+
filters: List[str] = [],
384385
limit: int = 10,
385386
offset: int = 0,
386387
content: bool = True,
@@ -391,6 +392,7 @@ def search(
391392
}
392393
query_params = {
393394
"q": query,
395+
"filters": filters,
394396
"limit": limit,
395397
"offset": offset,
396398
"content": content,

0 commit comments

Comments
 (0)