mirror of
https://github.com/alexgo-io/bitcoin-indexer.git
synced 2026-01-12 16:52:57 +08:00
chore: display full bitcoin-indexer names in api status (#509)
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user