Migrated ShlinkApiClient from axios to fetch

This commit is contained in:
Alejandro Celaya
2022-11-13 16:57:16 +01:00
parent ba48104c5c
commit 16bee43f12
5 changed files with 58 additions and 46 deletions

View File

@@ -18,6 +18,7 @@ const provideServices = (bottle: Bottle, connect: ConnectDecorator) => {
bottle.constant('window', (global as any).window);
bottle.constant('console', global.console);
bottle.constant('axios', axios);
bottle.constant('fetch', (global as any).fetch.bind((global as any)));
bottle.service('ImageDownloader', ImageDownloader, 'axios', 'window');
bottle.service('ReportExporter', ReportExporter, 'window', 'jsonToCsv');