diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-12-06 19:15:20 -0600 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-12-06 19:15:20 -0600 |
| commit | bfd282f7c4a02cccf61e782bb712803b5dafba76 (patch) | |
| tree | e2d68cad1e3b3eb5f4b876599af245416324864a /src | |
| parent | f7f3f51aa9dc33a2ed3642dacb534b58d769cdab (diff) | |
| download | slskd-bfd282f7c4a02cccf61e782bb712803b5dafba76.tar.gz | |
add restart, shutdown and getVersion
Diffstat (limited to 'src')
| -rw-r--r-- | src/web/src/lib/application.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/web/src/lib/application.js b/src/web/src/lib/application.js index 01425953..0c8b8319 100644 --- a/src/web/src/lib/application.js +++ b/src/web/src/lib/application.js @@ -2,4 +2,16 @@ import api from './api'; export const getState = async () => { return (await api.get('/application')).data; -};
\ No newline at end of file +}; + +export const restart = async () => { + return api.put('/application'); +}; + +export const shutdown = async () => { + return api.delete('/application'); +} + +export const getVersion = async ({ forceCheck = false }) => { + return (await api.get(`/application/version/latest?forceCheck=${forceCheck}`)).data; +}
\ No newline at end of file |
