Use apiClient factory to dynamically resolved different values at runtime

This commit is contained in:
Alejandro Celaya
2023-07-26 20:04:50 +02:00
parent 3a0cea1268
commit d49da185d3
33 changed files with 146 additions and 80 deletions

View File

@@ -1,6 +1,7 @@
import type Bottle from 'bottlejs';
import { Main } from '../Main';
import type { ConnectDecorator } from './index';
import { setUpStore } from './store';
export const provideServices = (bottle: Bottle, connect: ConnectDecorator) => {
bottle.serviceFactory(
@@ -18,6 +19,7 @@ export const provideServices = (bottle: Bottle, connect: ConnectDecorator) => {
'EditShortUrl',
'ManageDomains',
);
bottle.decorator('Main', connect(null, ['loadMercureInfo']));
bottle.factory('store', setUpStore);
};