Fix naming convention "as" => "isp"

This commit is contained in:
nymkappa committed 2022-07-17 23:29:40 +02:00
1 parent 09171c749a
commit d7f0dc4c05
8 files changed
+13 -13

No files matched your search

+1 -1
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
+3 -3
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());