From 5b80b43e2abb19f183abdcbe1913591f15d5af4e Mon Sep 17 00:00:00 2001 From: softsimon Date: Tue, 26 May 2020 16:34:55 +0700 Subject: [PATCH] Add hostname to initial websocket data. --- backend/src/api/websocket-handler.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/src/api/websocket-handler.ts b/backend/src/api/websocket-handler.ts index ecbc7f6d8..a80768957 100644 --- a/backend/src/api/websocket-handler.ts +++ b/backend/src/api/websocket-handler.ts @@ -7,6 +7,7 @@ import blocks from './blocks'; import memPool from './mempool'; import mempoolBlocks from './mempool-blocks'; import fiatConversion from './fiat-conversion'; +import * as os from 'os'; class WebsocketHandler { private wss: WebSocket.Server | undefined; @@ -92,7 +93,8 @@ class WebsocketHandler { 'blocks': _blocks.slice(Math.max(_blocks.length - config.INITIAL_BLOCK_AMOUNT, 0)), 'conversions': fiatConversion.getTickers()['BTCUSD'], 'mempool-blocks': mempoolBlocks.getMempoolBlocks(), - 'git-commit': this.latestGitCommitHash + 'git-commit': this.latestGitCommitHash, + 'hostname': os.hostname(), })); }