15 lines
277 B
JavaScript
15 lines
277 B
JavaScript
|
|
||
|
export default class EncoderRoutes {
|
||
|
constructor(opts = {}) {
|
||
|
Object.assign(this, opts)
|
||
|
}
|
||
|
|
||
|
registerIo(server, ctx) {
|
||
|
ctx.socket.safeOn('encoder.status', this.status.bind(this))
|
||
|
}
|
||
|
|
||
|
status(ctx) {
|
||
|
ctx.socket.emit('encoder.status', { running: false })
|
||
|
}
|
||
|
}
|