mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-07-20 18:51:53 +00:00
Consolidate all service definitions in one module
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
import type Bottle from 'bottlejs';
|
||||
import { CreateServerFactory } from '../CreateServer';
|
||||
import { ImportServersBtnFactory } from '../helpers/ImportServersBtn';
|
||||
import { withoutSelectedServer } from '../helpers/withoutSelectedServer';
|
||||
import { ManageServersFactory } from '../ManageServers';
|
||||
import { ServersExporter } from './ServersExporter';
|
||||
import { ServersImporter } from './ServersImporter';
|
||||
|
||||
export const provideServices = (bottle: Bottle) => {
|
||||
// Components
|
||||
bottle.factory('ManageServers', ManageServersFactory);
|
||||
bottle.decorator('ManageServers', withoutSelectedServer);
|
||||
|
||||
bottle.factory('CreateServer', CreateServerFactory);
|
||||
bottle.decorator('CreateServer', withoutSelectedServer);
|
||||
|
||||
bottle.factory('ImportServersBtn', ImportServersBtnFactory);
|
||||
|
||||
// Services
|
||||
bottle.service('ServersImporter', ServersImporter, 'csvToJson');
|
||||
bottle.service('ServersExporter', ServersExporter, 'Storage', 'window', 'jsonToCsv');
|
||||
};
|
||||
Reference in New Issue
Block a user