Skip to content

Commit 7b1ebe7

Browse files
authored
fix: fix DataSourceQualifier (#238)
<!-- Thank you for your pull request. Please review below requirements. Bug fixes and new features should include tests and possibly benchmarks. Contributors guide: https://github.com/eggjs/egg/blob/master/CONTRIBUTING.md 感谢您贡献代码。请确认下列 checklist 的完成情况。 Bug 修复和新功能必须包含测试,必要时请附上性能测试。 Contributors guide: https://github.com/eggjs/egg/blob/master/CONTRIBUTING.md --> ##### Checklist <!-- Remove items that do not apply. For completed items, change [ ] to [x]. --> - [ ] `npm test` passes - [ ] tests and/or benchmarks are included - [ ] documentation is changed or added - [ ] commit message follows commit guidelines ##### Affected core subsystem(s) <!-- Provide affected core subsystem(s). --> ##### Description of change <!-- Provide a description of the change below this comment. --> <!-- - any feature? - close https://github.com/eggjs/egg/ISSUE_URL --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Simplified the function call in the `DataSourceQualifier`, enhancing clarity and maintainability. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 081b4eb commit 7b1ebe7

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import { DataSourceQualifierAttribute } from '@eggjs/tegg-types';
2-
import type { EggProtoImplClass } from '@eggjs/tegg-types';
32
import { QualifierUtil } from '@eggjs/core-decorator';
43

54
export function DataSourceQualifier(dataSourceName: string) {
65
return function(target: any, propertyKey: PropertyKey, parameterIndex?: number) {
7-
QualifierUtil.addInjectQualifier(target.constructor as EggProtoImplClass,
8-
propertyKey, parameterIndex, DataSourceQualifierAttribute, dataSourceName);
6+
QualifierUtil.addInjectQualifier(target, propertyKey, parameterIndex, DataSourceQualifierAttribute, dataSourceName);
97
};
108
}

0 commit comments

Comments
 (0)