🎛️ Adds system service

This commit is contained in:
Rune Harlyk
2024-11-01 13:41:24 +01:00
parent 3054d5eb12
commit 9f3c4ffdf2
18 changed files with 237 additions and 442 deletions
@@ -7,7 +7,7 @@
const features = useFeatureFlags();
const postSleep = async () => await api.post('/api/sleep');
const postSleep = async () => await api.post('/api/system/sleep');
const confirmSleep = () => {
openModal(ConfirmDialog, {
@@ -37,7 +37,7 @@
let systemInformation: SystemInformation;
async function getSystemStatus() {
const result = await api.get<SystemInformation>('/api/systemStatus');
const result = await api.get<SystemInformation>('/api/system/status');
if (result.isErr()) {
console.error('Error:', result.inner);
return;
@@ -46,7 +46,7 @@
return systemInformation;
}
const postFactoryReset = async () => await api.post('/api/factoryReset');
const postFactoryReset = async () => await api.post('/api/system/reset');
const postSleep = async () => await api.post('api/sleep');
@@ -57,7 +57,7 @@
const handleSystemData = (data: Analytics) =>
(systemInformation = { ...systemInformation, ...data });
const postRestart = async () => await api.post('/api/restart');
const postRestart = async () => await api.post('/api/system/restart');
function confirmRestart() {
openModal(ConfirmDialog, {