Skip to content

Commit

Permalink
UI: quick hack for node refresh not actually reloading from Companion
Browse files Browse the repository at this point in the history
  • Loading branch information
leccelecce committed Aug 6, 2024
1 parent b7349ca commit b82015d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ app.get("/api/floors", (req: Request, res: Response) => {
app.get("/api/nodes", (req: Request, res: Response) => {
log(req);

try {
var espCompanionConfigReq = axios({ url: "/state/config" });
//espCompanionConfig = espCompanionConfigReq.data;
//mqttConfig = espCompanionConfig.mqtt;
//floorsConfig = espCompanionConfig.floors;
nodesConfig = espCompanionConfig.nodes;
} catch (error) {
console.error(error);
}

res.status(200).json(nodesConfig);
});

Expand Down

0 comments on commit b82015d

Please sign in to comment.