From bfd282f7c4a02cccf61e782bb712803b5dafba76 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Mon, 6 Dec 2021 19:15:20 -0600 Subject: add restart, shutdown and getVersion --- src/web/src/lib/application.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3