aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
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