Skip to content

Commit

Permalink
ATOR-240 - Fix onionoo response
Browse files Browse the repository at this point in the history
  • Loading branch information
yumirkov committed Apr 15, 2024
1 parent 0148eed commit a7ddbcc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/OnionooService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export class OnionooService {
}

async details(): Promise<any> {
return await axios.get(`${this.baseUrl}/details`).then();
return await axios.get(`${this.baseUrl}/details`);
}

}
Expand Down
2 changes: 1 addition & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ app.get('/average-bandwidth-rate-latest', async (req, res) => {
app.get('/relays/:fingerprint', async (req, res) => {
try {
const details = await onionooService.details();
console.log('Details:', details);

const foundRelay = details.relays.find((relay: { fingerprint: string; }) =>
relay.fingerprint === req.params.fingerprint
);

console.log('Found relay:', foundRelay);

if (foundRelay) {
Expand Down

0 comments on commit a7ddbcc

Please sign in to comment.