mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-26 09:56:17 -05:00
Adding Doc filter button so users can search just PDFs/EPUB/etc.
This commit is contained in:
parent
9468448a54
commit
66cecce5e6
4 changed files with 32 additions and 6 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue