chore: display full bitcoin-indexer names in api status (#509)

This commit is contained in:
Rafael Cárdenas
2025-03-20 13:19:03 -06:00
committed by GitHub
parent 74dca812df
commit 6fdd83ac02
3 changed files with 4 additions and 4 deletions

View File

@@ -30,7 +30,7 @@ export const StatusRoutes: FastifyPluginCallback<
const max_inscription_number = await fastify.db.getMaxInscriptionNumber();
const max_cursed_inscription_number = await fastify.db.getMaxCursedInscriptionNumber();
return {
server_version: `ordinals-api ${SERVER_VERSION.tag} (${SERVER_VERSION.branch}:${SERVER_VERSION.commit})`,
server_version: `bitcoin-indexer-ordinals-api ${SERVER_VERSION.tag} (${SERVER_VERSION.branch}:${SERVER_VERSION.commit})`,
status: 'ready',
block_height,
max_inscription_number,

View File

@@ -36,7 +36,7 @@ describe('Status', () => {
const response = await fastify.inject({ method: 'GET', url: '/ordinals/v1/' });
const json = response.json();
expect(json).toStrictEqual({
server_version: 'ordinals-api v0.0.1 (test:123456)',
server_version: 'bitcoin-indexer-ordinals-api v0.0.1 (test:123456)',
status: 'ready',
});
const noVersionResponse = await fastify.inject({ method: 'GET', url: '/ordinals/' });
@@ -116,7 +116,7 @@ describe('Status', () => {
const response = await fastify.inject({ method: 'GET', url: '/ordinals/v1/' });
const json = response.json();
expect(json).toStrictEqual({
server_version: 'ordinals-api v0.0.1 (test:123456)',
server_version: 'bitcoin-indexer-ordinals-api v0.0.1 (test:123456)',
status: 'ready',
block_height: 791975,
max_inscription_number: 0,

View File

@@ -29,7 +29,7 @@ export const StatusRoutes: FastifyPluginCallback<
const result = await fastify.db.sqlTransaction(async sql => {
const block_height = await fastify.db.getChainTipBlockHeight();
return {
server_version: `runes-api ${SERVER_VERSION.tag} (${SERVER_VERSION.branch}:${SERVER_VERSION.commit})`,
server_version: `bitcoin-indexer-runes-api ${SERVER_VERSION.tag} (${SERVER_VERSION.branch}:${SERVER_VERSION.commit})`,
status: 'ready',
block_height: block_height ? parseInt(block_height) : undefined,
};