Add options to search method

This commit is contained in:
Stanislav Romanov 2022-05-03 12:54:31 +03:00
parent 82156d99fe
commit cab3bf0bdf

View file

@ -26,10 +26,12 @@ export default class Index {
return query(`${this.indexPath}/settings`);
}
search(q) {
search(q, options = {}) {
options.q = q;
return query(`${this.indexPath}/search`, {
method: 'POST',
body: JSON.stringify({ q }),
body: JSON.stringify(options),
});
}
}