From 2b4035818c267f5d80dbc8fc3490ea8125739d06 Mon Sep 17 00:00:00 2001 From: Alex Christoffer Rasmussen Date: Mon, 4 Sep 2023 14:54:59 +0200 Subject: [PATCH] feat: add connected endpoint (#87) Co-authored-by: arc-alex --- src/client.ts | 3 +++ src/rest.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/client.ts b/src/client.ts index db9b5d7..5d8ee73 100644 --- a/src/client.ts +++ b/src/client.ts @@ -112,6 +112,9 @@ export class CompanionSatelliteClient extends EventEmitter { ctx.body = this.client.port }) + this.router.get('/api/connected', (ctx) => { + ctx.body = this.client.connected + }) this.router.get('/api/config', (ctx) => { ctx.body = { host: this.client.host, port: this.client.port } })