From 7e61941789f27372c81e109338b248f662d6bd04 Mon Sep 17 00:00:00 2001 From: Liz Cray Date: Fri, 20 Dec 2024 20:56:50 -0500 Subject: [PATCH] Update imports --- getDevices.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/getDevices.js b/getDevices.js index 95d31d4..70233d7 100644 --- a/getDevices.js +++ b/getDevices.js @@ -1,9 +1,9 @@ -const axios = require('axios') -const fs = require('fs') +import fs from 'fs' +import axios from 'axios' let config = JSON.parse(fs.readFileSync('config.json', 'utf8')) axios.get(`http://${config.servers.deconz.url}:${config.servers.deconz.apiPort}/api/${config.servers.deconz.apiKey}/sensors`) .then(response => { - // console.log(response.data) + console.log(response.data) fs.writeFileSync('devices.json', JSON.stringify(response.data, null, 2)) }) \ No newline at end of file