aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-11-18 19:55:33 -0600
committerJP Dillingham <jpdillingham@gmail.com>2021-11-18 19:55:33 -0600
commit15d98bc2e1d891202906b1164478391d3d683253 (patch)
tree0de9dcef762245f2a5b374f6665bec85c67fea2a /src
parente644030a321bf3df154a5c7908f6f88184f28ea5 (diff)
downloadslskd-15d98bc2e1d891202906b1164478391d3d683253.tar.gz
add options lib
Diffstat (limited to 'src')
-rw-r--r--src/web/src/lib/options.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/web/src/lib/options.js b/src/web/src/lib/options.js
new file mode 100644
index 00000000..e299996d
--- /dev/null
+++ b/src/web/src/lib/options.js
@@ -0,0 +1,17 @@
+import api from './api';
+
+export const getCurrent = async () => {
+ return (await api.get('/options')).data;
+};
+
+export const getYaml = async () => {
+ return (await api.get('/options/yaml')).data;
+};
+
+export const validateYaml = async ({ yaml }) => {
+ return (await api.post('/options/yaml/validate', yaml)).data;
+};
+
+export const updateYaml = async ({ yaml }) => {
+ return (await api.post('/options/yaml', yaml)).data;
+}; \ No newline at end of file