Optimize empty search queries
This commit is contained in:
parent
7639883c6a
commit
2effa08c32
|
@ -42,6 +42,9 @@ proc getSearch*[T](query: Query; after, agent: string): Future[Result[T]] {.asyn
|
||||||
"reset_error_state": "false"
|
"reset_error_state": "false"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if param in ["include:nativeretweets", "-filter:nativeretweets", ""]:
|
||||||
|
return Result[T](query: query, beginning: true)
|
||||||
|
|
||||||
let json = await fetchJson(base / searchUrl ? params, headers)
|
let json = await fetchJson(base / searchUrl ? params, headers)
|
||||||
if json == nil: return Result[T](query: query, beginning: true)
|
if json == nil: return Result[T](query: query, beginning: true)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue