From e028dd9674e18c7b1213f393a25dd8e425ab7a27 Mon Sep 17 00:00:00 2001 From: ClaudiaHolhos Date: Tue, 14 Dec 2021 14:59:16 +0200 Subject: [PATCH] working check --- src/@utils/provider.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/@utils/provider.ts b/src/@utils/provider.ts index 889558238..d0a2210cb 100644 --- a/src/@utils/provider.ts +++ b/src/@utils/provider.ts @@ -54,11 +54,11 @@ export async function getFileInfo( } } -export async function fetchMethod(url: string): Promise { - const result = await axios.get(url) +async function fetchMethod(url: string): Promise { + const result = await fetch(url) if (!result) { - console.error(`Error requesting ${url}`) - console.error(`Response message: \n${result}`) + LoggerInstance.error(`Error requesting ${url}`) + LoggerInstance.error(`Response message: \n${result}`) throw result } return result @@ -66,10 +66,7 @@ export async function fetchMethod(url: string): Promise { export async function isValidProvider(url: string): Promise { try { - const response = await ProviderInstance.isValidProvider( - url, - fetchMethod(url) - ) + const response = await ProviderInstance.isValidProvider(url, fetchMethod) return response } catch (error) { console.error(`Error validating provider: ${error.message}`)