fix: add /health/ledger path for NPM-safe dashboard data
Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 1m15s
CI/CD Pipeline / Security Scanning (push) Successful in 2m30s
CI/CD Pipeline / Lint and Format (push) Failing after 13m24s
CI/CD Pipeline / Terraform Validation (push) Failing after 56s
CI/CD Pipeline / Kubernetes Validation (push) Successful in 33s
Validation / validate-genesis (push) Successful in 39s
Validation / validate-terraform (push) Has started running
Validation / validate-kubernetes (push) Has been cancelled
Validation / validate-smart-contracts (push) Has been cancelled
Validation / validate-security (push) Has been cancelled
Validation / validate-documentation (push) Has been cancelled
Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 1m15s
CI/CD Pipeline / Security Scanning (push) Successful in 2m30s
CI/CD Pipeline / Lint and Format (push) Failing after 13m24s
CI/CD Pipeline / Terraform Validation (push) Failing after 56s
CI/CD Pipeline / Kubernetes Validation (push) Successful in 33s
Validation / validate-genesis (push) Successful in 39s
Validation / validate-terraform (push) Has started running
Validation / validate-kubernetes (push) Has been cancelled
Validation / validate-smart-contracts (push) Has been cancelled
Validation / validate-security (push) Has been cancelled
Validation / validate-documentation (push) Has been cancelled
Query params may be stripped by reverse proxy; use dedicated path for ledger. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -13,7 +13,7 @@ export type MoneySupply = {
|
||||
};
|
||||
|
||||
async function loadMoneySupply(): Promise<MoneySupply | null> {
|
||||
for (const path of ['/public/money-supply', '/money-supply/public']) {
|
||||
for (const path of ['/public/money-supply', '/money-supply/public', '/health/ledger']) {
|
||||
const res = await fetch(settlementApi(path));
|
||||
if (res.ok) return res.json();
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ export type M2Token = DexToken & {
|
||||
};
|
||||
|
||||
async function loadOfficeMoneySupply(): Promise<MoneySupply | null> {
|
||||
for (const path of ['/public/money-supply', '/money-supply/public']) {
|
||||
for (const path of ['/public/money-supply', '/money-supply/public', '/health/ledger']) {
|
||||
const res = await fetch(settlementApi(path));
|
||||
if (res.ok) return res.json();
|
||||
}
|
||||
|
||||
@@ -57,6 +57,8 @@ export function createSettlementRouter(): Router {
|
||||
const officeId = settlementOfficeId();
|
||||
const profile = loadOfficeProfile();
|
||||
|
||||
router.get('/health/ledger', (_req, res) => respondPublicMoneySupply(res, officeId));
|
||||
|
||||
router.get('/health', async (req, res) => {
|
||||
let chainStats = { total: 0, active: 0 };
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user