From 15d98bc2e1d891202906b1164478391d3d683253 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Thu, 18 Nov 2021 19:55:33 -0600 Subject: add options lib --- src/web/src/lib/options.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/web/src/lib/options.js (limited to 'src/web') 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 -- cgit v1.2.3