From 7b1ebe718736d93e548f531bf99c5d2d38b41046 Mon Sep 17 00:00:00 2001 From: killa Date: Sun, 29 Sep 2024 15:18:27 +0800 Subject: [PATCH] fix: fix DataSourceQualifier (#238) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ##### Checklist - [ ] `npm test` passes - [ ] tests and/or benchmarks are included - [ ] documentation is changed or added - [ ] commit message follows commit guidelines ##### Affected core subsystem(s) ##### Description of change ## Summary by CodeRabbit - **Refactor** - Simplified the function call in the `DataSourceQualifier`, enhancing clarity and maintainability. --- core/dal-decorator/src/decorator/DataSourceQualifier.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/dal-decorator/src/decorator/DataSourceQualifier.ts b/core/dal-decorator/src/decorator/DataSourceQualifier.ts index 44e50f81..19a4bc3f 100644 --- a/core/dal-decorator/src/decorator/DataSourceQualifier.ts +++ b/core/dal-decorator/src/decorator/DataSourceQualifier.ts @@ -1,10 +1,8 @@ import { DataSourceQualifierAttribute } from '@eggjs/tegg-types'; -import type { EggProtoImplClass } from '@eggjs/tegg-types'; import { QualifierUtil } from '@eggjs/core-decorator'; export function DataSourceQualifier(dataSourceName: string) { return function(target: any, propertyKey: PropertyKey, parameterIndex?: number) { - QualifierUtil.addInjectQualifier(target.constructor as EggProtoImplClass, - propertyKey, parameterIndex, DataSourceQualifierAttribute, dataSourceName); + QualifierUtil.addInjectQualifier(target, propertyKey, parameterIndex, DataSourceQualifierAttribute, dataSourceName); }; }