Skip to content

Commit

Permalink
fix: fix the use of asynchronous injection 💉
Browse files Browse the repository at this point in the history
  • Loading branch information
ChoGathK committed Oct 22, 2022
1 parent bd539fd commit c228518
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/provider/dynamic-data-source.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Inject, Injectable } from '@nestjs/common';
import { Injectable } from '@nestjs/common';
import { This } from '@vodyani/class-decorator';
import { IClientMediator, IClientAdapter } from '@vodyani/core';
import { IClientMediator, IClientAdapter, AsyncInject } from '@vodyani/core';

import { ArkManager } from './ark-manager';
import { ConfigProvider } from './config';
Expand All @@ -12,7 +12,7 @@ export class AsyncDynamicDataSourceProvider<T = any, C = any> implements IClient
private readonly keys = new Set<string>();

constructor(
@Inject(ArkManager.getToken())
@AsyncInject(ArkManager)
private readonly config: ConfigProvider<C>,
) {}

Expand Down Expand Up @@ -60,7 +60,7 @@ export class DynamicDataSourceProvider<T = any, C = any> implements IClientMedia
private readonly keys = new Set<string>();

constructor(
@Inject(ArkManager.getToken())
@AsyncInject(ArkManager)
private readonly config: ConfigProvider<C>,
) {}

Expand Down
2 changes: 1 addition & 1 deletion src/struct/config-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { IConfig, IConfigClientSubscriber, IConfigObserver } from '@vodyani/core

import { IConfigHandler, ConfigHandlerOptions } from '../common';

abstract class AbstractConfigHandler<T = any> implements IConfigHandler<T> {
export abstract class AbstractConfigHandler<T = any> implements IConfigHandler<T> {
protected next: IConfigHandler;

public setNext(handler: IConfigHandler) {
Expand Down

0 comments on commit c228518

Please sign in to comment.