Modularize config functions

This commit is contained in:
tsightler
2022-02-06 16:31:43 -05:00
parent 6da7c4f4af
commit d17a429581
2 changed files with 3 additions and 3 deletions

View File

@@ -54,8 +54,8 @@ class Config {
this.data = require(this.file)
this.valid = true
} catch (err) {
debug('Configuration file not found or could not be parsed, please check the config!')
debug(err)
debug(err.message)
debug('Configuration file could not be read, check that it exist at location and is valid.')
}
}

View File

@@ -440,7 +440,7 @@ async function updateToken(newRefreshToken, oldRefreshToken, stateFile, stateDat
const main = async(generatedToken) => {
let ringAuth = new Object()
let stateData = new Object()
let stateFile
let stateFile = '/data/ring-state.json'
let ringClient
let mqttClient