mirror of
https://github.com/tsightler/ring-mqtt.git
synced 2025-09-26 21:01:12 +08:00
Fix up linting errors
This commit is contained in:
@@ -31,10 +31,11 @@ export default new class Config {
|
||||
await this.loadConfigFile()
|
||||
this.doMqttDiscovery()
|
||||
break;
|
||||
default:
|
||||
default: {
|
||||
const configPath = dirname(fileURLToPath(new URL('.', import.meta.url)))+'/'
|
||||
this.file = (process.env.RINGMQTT_CONFIG) ? configPath+process.env.RINGMQTT_CONFIG : configPath+'config.json'
|
||||
await this.loadConfigFile()
|
||||
}
|
||||
}
|
||||
|
||||
// If there's still no configured settings, force some defaults.
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import exithandler from './exithandler.js'
|
||||
import mqtt from './mqtt.js'
|
||||
export * from './exithandler.js'
|
||||
export * from './mqtt.js'
|
||||
import state from './state.js'
|
||||
import ring from './ring.js'
|
||||
import utils from './utils.js'
|
||||
|
@@ -241,6 +241,7 @@ export default new class RingMqtt {
|
||||
case 'not-supported':
|
||||
// Save unsupported device type for log output later
|
||||
unsupportedDevices.push(device.deviceType)
|
||||
// fall through
|
||||
case 'ignore':
|
||||
ringDevice=false
|
||||
break
|
||||
|
@@ -87,9 +87,7 @@ export class WeriftPeerConnection extends Subscribed {
|
||||
this.addSubscriptions(merge(this.onRequestKeyFrame, interval(4000)).subscribe(() => {
|
||||
videoTransceiver.receiver
|
||||
.sendRtcpPLI(track.ssrc)
|
||||
.catch((e) => {
|
||||
// debug(e)
|
||||
})
|
||||
.catch()
|
||||
}))
|
||||
this.requestKeyFrame()
|
||||
})
|
||||
@@ -131,9 +129,7 @@ export class WeriftPeerConnection extends Subscribed {
|
||||
}
|
||||
|
||||
close() {
|
||||
this.pc.close().catch((e) => {
|
||||
//debug
|
||||
})
|
||||
this.pc.close().catch()
|
||||
this.unsubscribe()
|
||||
}
|
||||
}
|
||||
|
@@ -150,7 +150,7 @@ export class WebrtcConnection extends Subscribed {
|
||||
return
|
||||
case 'pong':
|
||||
return
|
||||
case 'notification':
|
||||
case 'notification': {
|
||||
const { text } = message.body
|
||||
if (text === 'camera_connected') {
|
||||
this.onCameraConnected.next()
|
||||
@@ -162,6 +162,7 @@ export class WebrtcConnection extends Subscribed {
|
||||
return
|
||||
}
|
||||
break
|
||||
}
|
||||
case 'close':
|
||||
this.callEnded()
|
||||
return
|
||||
@@ -219,7 +220,7 @@ export class WebrtcConnection extends Subscribed {
|
||||
})
|
||||
this.ws.close()
|
||||
}
|
||||
catch (_) {
|
||||
catch {
|
||||
// ignore any errors since we are stopping the call
|
||||
}
|
||||
this.hasEnded = true
|
||||
|
@@ -100,7 +100,7 @@ export default new class TokenApp {
|
||||
const code = req.body.code
|
||||
try {
|
||||
generatedToken = await restClient.getAuth(code)
|
||||
} catch(err) {
|
||||
} catch {
|
||||
generatedToken = false
|
||||
const errormsg = 'The 2FA code was not accepted, please verify the code and try again.'
|
||||
debug(errormsg)
|
||||
|
Reference in New Issue
Block a user