From 7a04325a2dd5fa86e40b074376cf319819fffe54 Mon Sep 17 00:00:00 2001 From: modship Date: Fri, 28 Jun 2024 14:28:03 +0200 Subject: [PATCH] prettier --- frontend/src/ExplorerApiClient.ts | 56 +++++++++++++++++-------------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/frontend/src/ExplorerApiClient.ts b/frontend/src/ExplorerApiClient.ts index 2326ee1..4cb8806 100644 --- a/frontend/src/ExplorerApiClient.ts +++ b/frontend/src/ExplorerApiClient.ts @@ -1,35 +1,39 @@ import axios from 'axios'; export class ExplorerApiClient { - private url_api: string; + private url_api: string; - constructor() { - this.url_api = import.meta.env.VITE_EXPLORER_API_URL; - } + constructor() { + this.url_api = import.meta.env.VITE_EXPLORER_API_URL; + } - async getDomainOwnedByAddress(address: string): Promise { - return new Promise((resolve, reject) => { - axios.get(this.url_api + '/dns/addresses/owner', { params: { addresses: [address] } }) - .then((response) => { - resolve(response.data[address]); - }) - .catch((error) => { - console.error(error); - reject(error); - }); + async getDomainOwnedByAddress(address: string): Promise { + return new Promise((resolve, reject) => { + axios + .get(this.url_api + '/dns/addresses/owner', { + params: { addresses: [address] }, + }) + .then((response) => { + resolve(response.data[address]); + }) + .catch((error) => { + console.error(error); + reject(error); }); - } + }); + } - async getDomainsInfo(domains: string[]): Promise { - return new Promise((resolve, reject) => { - axios.get(this.url_api + '/dns/info', { params: { dns: domains } }) - .then((response) => { - resolve(response.data); - }) - .catch((error) => { - console.error(error); - reject(error); - }); + async getDomainsInfo(domains: string[]): Promise { + return new Promise((resolve, reject) => { + axios + .get(this.url_api + '/dns/info', { params: { dns: domains } }) + .then((response) => { + resolve(response.data); + }) + .catch((error) => { + console.error(error); + reject(error); }); - } + }); + } }