fixed error, not using createAxiosRetry() when not using register/registerAsync()
This commit is contained in:
parent
995e61e8a7
commit
3e2d961a2e
1 changed files with 2 additions and 2 deletions
|
@ -14,7 +14,7 @@ import {
|
||||||
} from './interfaces';
|
} from './interfaces';
|
||||||
import axiosRetry from 'axios-retry';
|
import axiosRetry from 'axios-retry';
|
||||||
|
|
||||||
const createAxiosRetry = (config: HttpModuleOptions) => {
|
const createAxiosRetry = (config?: HttpModuleOptions) => {
|
||||||
const axiosInstance = Axios.create(config);
|
const axiosInstance = Axios.create(config);
|
||||||
axiosRetry(axiosInstance, config);
|
axiosRetry(axiosInstance, config);
|
||||||
return axiosInstance;
|
return axiosInstance;
|
||||||
|
@ -25,7 +25,7 @@ const createAxiosRetry = (config: HttpModuleOptions) => {
|
||||||
HttpService,
|
HttpService,
|
||||||
{
|
{
|
||||||
provide: AXIOS_INSTANCE_TOKEN,
|
provide: AXIOS_INSTANCE_TOKEN,
|
||||||
useValue: Axios,
|
useValue: createAxiosRetry(),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
exports: [HttpService],
|
exports: [HttpService],
|
||||||
|
|
Loading…
Reference in a new issue