Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
modship committed Jun 28, 2024
1 parent 894f241 commit 7a04325
Showing 1 changed file with 30 additions and 26 deletions.
56 changes: 30 additions & 26 deletions frontend/src/ExplorerApiClient.ts
Original file line number Diff line number Diff line change
@@ -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<string[]> {
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<string[]> {
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<any> {
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<any> {

Check failure on line 26 in frontend/src/ExplorerApiClient.ts

View workflow job for this annotation

GitHub Actions / lint-frontend

Unexpected any. Specify a different type
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);
});
}
});
}
}

0 comments on commit 7a04325

Please sign in to comment.