update
Took 23 minutes
This commit is contained in:
@ -160,7 +160,7 @@ router.ws('/', async (ws, req, next) => {
|
||||
break;
|
||||
}
|
||||
case RequestType.CHECK: {
|
||||
let conf = msg.data as {
|
||||
let conf = msg.data.data as {
|
||||
"led_enabled": boolean,
|
||||
"remote_enabled": boolean,
|
||||
"hotspot_enabled": boolean,
|
||||
@ -171,7 +171,6 @@ router.ws('/', async (ws, req, next) => {
|
||||
|
||||
await SensorHelper.clearAllRawMeasurements();
|
||||
|
||||
|
||||
let content: { success: boolean, msg: string } = {
|
||||
success: true,
|
||||
msg: "Prüfung erfolgreich."
|
||||
@ -180,9 +179,16 @@ router.ws('/', async (ws, req, next) => {
|
||||
// Check config
|
||||
/// Check Proxy
|
||||
if (conf["arduino_proxy_enabled"]) {
|
||||
try {
|
||||
await ArduinoProxy.disconnect();
|
||||
} catch( e )
|
||||
{
|
||||
|
||||
}
|
||||
try {
|
||||
await ArduinoProxy.connect();
|
||||
} catch (e) {
|
||||
log("Checkup failed");
|
||||
content.success = false;
|
||||
content.msg = "Bei der Kommunikation mit dem Arduino Proxy ist ein Fehler aufgetreten.<br>Technische Details: " + e;
|
||||
return WebSocketHandler.answerRequest(msg.data["type"] as RequestType, content);
|
||||
@ -259,6 +265,16 @@ router.ws('/', async (ws, req, next) => {
|
||||
|
||||
}
|
||||
|
||||
case RequestType.UPDATE: {
|
||||
/*
|
||||
- git pull
|
||||
- yarn install
|
||||
- yarn run compile
|
||||
- (arduino update?)
|
||||
- reboot
|
||||
*/
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user