Add options to search method
This commit is contained in:
parent
82156d99fe
commit
cab3bf0bdf
1 changed files with 4 additions and 2 deletions
|
|
@ -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),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue