mirror of
https://github.com/mempool/mempool.git
synced 2025-02-23 14:40:38 +01:00
Merge pull request #2123 from mempool/nymkappa/feature/ln-per-country-chart
Fix error 500 for `Isle of Man` nodes list
This commit is contained in:
commit
b776b935a0
1 changed files with 3 additions and 3 deletions
|
@ -129,7 +129,7 @@ class NodesApi {
|
|||
public async $getNodesPerCountry(countryId: string) {
|
||||
try {
|
||||
const query = `
|
||||
SELECT DISTINCT node_stats.public_key, node_stats.capacity, node_stats.channels, nodes.alias,
|
||||
SELECT node_stats.public_key, node_stats.capacity, node_stats.channels, nodes.alias,
|
||||
UNIX_TIMESTAMP(nodes.first_seen) as first_seen, UNIX_TIMESTAMP(nodes.updated_at) as updated_at,
|
||||
geo_names_city.names as city
|
||||
FROM node_stats
|
||||
|
@ -139,8 +139,8 @@ class NodesApi {
|
|||
GROUP BY public_key
|
||||
) as b ON b.public_key = node_stats.public_key AND b.last_added = node_stats.added
|
||||
JOIN nodes ON nodes.public_key = node_stats.public_key
|
||||
JOIN geo_names geo_names_country ON geo_names_country.id = nodes.country_id
|
||||
LEFT JOIN geo_names geo_names_city ON geo_names_city.id = nodes.city_id
|
||||
JOIN geo_names geo_names_country ON geo_names_country.id = nodes.country_id AND geo_names_country.type = 'country'
|
||||
LEFT JOIN geo_names geo_names_city ON geo_names_city.id = nodes.city_id AND geo_names_city.type = 'city'
|
||||
WHERE geo_names_country.id = ?
|
||||
ORDER BY capacity DESC
|
||||
`;
|
||||
|
|
Loading…
Add table
Reference in a new issue