const post = require('../lib/post') module.exports = function (app) { app.get("/heating", async function (req, res, next) { const response = await post.postRequest() const heating = response.updateData.zones[0] res.json(heating) }); app.get("/heating/status", async function (req, res, next) { const response = await post.postRequest() const heating = response.updateData.zones[0].status res.json(heating) }); app.get("/heating/config", async function (req, res, next) { const response = await post.postRequest() const heating = response.updateData.zones[0].config res.json(heating) }); }