diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-05-29 16:56:31 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-05-29 16:56:31 -0500 |
| commit | fbbaf853dcc135e43a7500bf56287098a84edca6 (patch) | |
| tree | 8bbe404532e2ed1929af12b637e545b26f468607 | |
| parent | 599ebb1a2b02620d2f97da067ce9eb78ca032f46 (diff) | |
| download | slskd-fbbaf853dcc135e43a7500bf56287098a84edca6.tar.gz | |
add getResponses
| -rw-r--r-- | src/web/src/lib/search.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/web/src/lib/search.js b/src/web/src/lib/search.js index c71dba96..47f431aa 100644 --- a/src/web/src/lib/search.js +++ b/src/web/src/lib/search.js @@ -4,6 +4,10 @@ export const search = ({ id, searchText }) => { return api.post(`/searches`, { id, searchText }); }; -export const getStatus = async ({ id }) => { +export const getStatus = async ({ id, includeResponses = false }) => { + return (await api.get(`/searches/${encodeURIComponent(id)}?includeResponses=${includeResponses}`)).data; +}; + +export const getResponses = async ({ id }) => { return (await api.get(`/searches/${encodeURIComponent(id)}`)).data; };
\ No newline at end of file |
