aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/web/src/lib/searches.js (renamed from src/web/src/lib/search.js)10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/web/src/lib/search.js b/src/web/src/lib/searches.js
index 362487bf..9561ab40 100644
--- a/src/web/src/lib/search.js
+++ b/src/web/src/lib/searches.js
@@ -4,7 +4,15 @@ export const getAll = async () => {
return (await api.get('/searches')).data;
}
-export const search = ({ id, searchText }) => {
+export const stop = ({ id }) => {
+ return api.put(`/searches/${encodeURIComponent(id)}`)
+}
+
+export const remove = ({ id }) => {
+ return api.delete(`/searches/${encodeURIComponent(id)}`)
+}
+
+export const create = ({ id, searchText }) => {
return api.post(`/searches`, { id, searchText });
};