Adding Doc filter button so users can search just PDFs/EPUB/etc.

This commit is contained in:
Roland 2026-04-14 15:32:06 -06:00
parent 9468448a54
commit 66cecce5e6
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
4 changed files with 32 additions and 6 deletions

View file

@ -2239,7 +2239,7 @@ export async function deleteDocs(docIds) {
return await apiDelete(`${DOCS_API}/${ids}`);
}
export async function searchDocs(offset, limit, searchStr, order, tagNames, author, subject) {
export async function searchDocs(offset, limit, searchStr, order, tagNames, author, subject, mimetype) {
offset = parseInt(offset || 0);
limit = parseInt(limit || DEFAULT_LIMIT);
let body = {offset, limit};
@ -2258,6 +2258,9 @@ export async function searchDocs(offset, limit, searchStr, order, tagNames, auth
if (subject) {
body['subject'] = subject;
}
if (mimetype) {
body['mimetype'] = mimetype;
}
console.debug('searching docs', body);
const response = await apiPost(`${DOCS_API}/search`, body);