server: fix paging if only notmuch results are found
This commit is contained in:
@@ -37,6 +37,12 @@ pub fn make_news_tag(tag: &str) -> String {
|
||||
}
|
||||
|
||||
pub async fn count(pool: &PgPool, query: &Query) -> Result<usize, ServerError> {
|
||||
if !query.remainder.is_empty() {
|
||||
// TODO: handle full text search against all sites, for now, early return if search words
|
||||
// are specified.
|
||||
return Ok(0);
|
||||
}
|
||||
|
||||
let row = sqlx::query_file!("sql/count.sql", query.tag, query.unread_only)
|
||||
.fetch_one(pool)
|
||||
.await?;
|
||||
|
||||
Reference in New Issue
Block a user