aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2022-04-26 22:51:50 -0500
committerJP Dillingham <jpdillingham@gmail.com>2022-04-26 22:51:50 -0500
commit02a0bed8c36128a80b1075ee6c216492aec35836 (patch)
treede182c42d62a0eb1840ef0d3138e60b669c7a7e3 /src
parent4be8762f8700f22ece610a208cfc04df742316fd (diff)
downloadslskd-02a0bed8c36128a80b1075ee6c216492aec35836.tar.gz
rename search lib
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 });
};