Removing fetch retries for now until I write it from scratch

This commit is contained in:
Gabe Kangas
2022-05-27 18:44:26 -07:00
parent 7ac66faf48
commit 680cfc977a
3 changed files with 1 additions and 36 deletions

View File

@@ -1,15 +1,10 @@
import { ClientConfig } from '../interfaces/client-config.model';
const originalFetch = require('isomorphic-fetch');
const fetch = require('fetch-retry')(originalFetch);
const ENDPOINT = `http://localhost:8080/api/config`;
class ClientConfigService {
public static async getConfig(): Promise<ClientConfig> {
const response = await fetch(ENDPOINT, {
retries: 20,
retryDelay: (attempt, error, response) => 3 ** attempt * 1000,
});
const response = await fetch(ENDPOINT);
const status = await response.json();
return status;
}