diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-11-18 19:55:33 -0600 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-11-18 19:55:33 -0600 |
| commit | 15d98bc2e1d891202906b1164478391d3d683253 (patch) | |
| tree | 0de9dcef762245f2a5b374f6665bec85c67fea2a /src/web | |
| parent | e644030a321bf3df154a5c7908f6f88184f28ea5 (diff) | |
| download | slskd-15d98bc2e1d891202906b1164478391d3d683253.tar.gz | |
add options lib
Diffstat (limited to 'src/web')
| -rw-r--r-- | src/web/src/lib/options.js | 17 |
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 |
