[CodeFactor] Apply fixes

This commit is contained in:
codefactor-io 2023-11-09 21:12:32 +00:00
parent 55a17b793b
commit fbf6853c96
No known key found for this signature in database
GPG key ID: B66B2D63282C190F
2 changed files with 2 additions and 12 deletions

View file

@ -15,8 +15,6 @@ import { useStateStore } from "../store/stateStore.js";
const state = useStateStore(pinia); const state = useStateStore(pinia);
import { startModem, stopModem } from "../js/api"; import { startModem, stopModem } from "../js/api";
</script> </script>
<template> <template>

View file

@ -1,29 +1,21 @@
import { getModemConfigAsJSON } from "./settingsHandler.ts"; import { getModemConfigAsJSON } from "./settingsHandler.ts";
import { getFromServer, postToServer } from "./rest.js"; import { getFromServer, postToServer } from "./rest.js";
export function getModemConfig() {
export function getModemConfig(){
// fetch Settings // fetch Settings
getFromServer("localhost", 5000, "config"); getFromServer("localhost", 5000, "config");
getFromServer("localhost", 5000, "devices/audio"); getFromServer("localhost", 5000, "devices/audio");
getFromServer("localhost", 5000, "devices/serial"); getFromServer("localhost", 5000, "devices/serial");
} }
export function saveModemConfig() {
export function saveModemConfig(){
postToServer("localhost", 5000, "config", getModemConfigAsJSON()); postToServer("localhost", 5000, "config", getModemConfigAsJSON());
} }
export function startModem() { export function startModem() {
postToServer("localhost", 5000, "modem/start", null); postToServer("localhost", 5000, "modem/start", null);
} }
export function stopModem() { export function stopModem() {
postToServer("localhost", 5000, "modem/stop", null); postToServer("localhost", 5000, "modem/stop", null);
} }