From 803cfa272d9c9812833ed3d66073ef11ec019d8a Mon Sep 17 00:00:00 2001 From: Dario Date: Thu, 21 Dec 2023 17:27:51 -0300 Subject: [PATCH] feat: include package version in health check response --- src/api/Api.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/api/Api.js b/src/api/Api.js index ae5b5eb6..295d5035 100644 --- a/src/api/Api.js +++ b/src/api/Api.js @@ -5,6 +5,7 @@ import { filterParams, getDelayedFields, MODULES } from './lib/apiTools' import config from '../lib/config' // It is used only in case Stats cannot provide the circulating supply import getCirculatingSupply from './lib/getCirculatingSupply' +import pckgJson from '../../package.json' class Api extends DataCollector { constructor ({ initConfig, log }, { modules, lastBlocks } = {}) { @@ -63,7 +64,7 @@ class Api extends DataCollector { info () { const info = { apiName: 'RSK Explorer API', - version: process.env.npm_package_version, + version: pckgJson.version, modules: config.api.modules, txTypes: Object.assign({}, txTypes) }