mirror of
https://github.com/tsightler/ring-mqtt.git
synced 2025-09-26 21:01:12 +08:00
Modularize config functions
This commit is contained in:
@@ -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.')
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user