Fix naming convention "as" => "isp"

This commit is contained in:
nymkappa
2022-07-17 11:46:36 +02:00
parent 211666d19d
commit ebac1ad240
8 changed files with 13 additions and 13 deletions

View File

@@ -94,7 +94,7 @@ class NodesApi {
}
}
public async $getNodesAsShare() {
public async $getNodesISP() {
try {
let query = `SELECT nodes.as_number as ispId, geo_names.names as names, COUNT(DISTINCT nodes.public_key) as nodesCount, SUM(capacity) as capacity
FROM nodes

View File

@@ -12,7 +12,7 @@ class NodesRoutes {
.get(config.MEMPOOL.API_URL_PREFIX + 'lightning/nodes/isp/:isp', this.$getNodesPerISP)
.get(config.MEMPOOL.API_URL_PREFIX + 'lightning/nodes/search/:search', this.$searchNode)
.get(config.MEMPOOL.API_URL_PREFIX + 'lightning/nodes/top', this.$getTopNodes)
.get(config.MEMPOOL.API_URL_PREFIX + 'lightning/nodes/asShare', this.$getNodesAsShare)
.get(config.MEMPOOL.API_URL_PREFIX + 'lightning/nodes/isp', this.$getNodesISP)
.get(config.MEMPOOL.API_URL_PREFIX + 'lightning/nodes/:public_key/statistics', this.$getHistoricalNodeStats)
.get(config.MEMPOOL.API_URL_PREFIX + 'lightning/nodes/:public_key', this.$getNode)
;
@@ -62,9 +62,9 @@ class NodesRoutes {
}
}
private async $getNodesAsShare(req: Request, res: Response) {
private async $getNodesISP(req: Request, res: Response) {
try {
const nodesPerAs = await nodesApi.$getNodesAsShare();
const nodesPerAs = await nodesApi.$getNodesISP();
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 1000 * 600).toUTCString());