From cab3bf0bdf105b7776a602baba88a039be93551b Mon Sep 17 00:00:00 2001 From: Stanislav Romanov Date: Tue, 3 May 2022 12:54:31 +0300 Subject: [PATCH] Add options to search method --- app/models/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/models/index.js b/app/models/index.js index 5dab0eb..231d9f6 100644 --- a/app/models/index.js +++ b/app/models/index.js @@ -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), }); } }