feat(core): 新增BusinessModule并替换原有FEATURE_MODULES引入方式,优化模块结构
This commit is contained in:
@@ -4,7 +4,7 @@ import { ConfigModule, ConfigService } from '@nestjs/config';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { ThrottlerModule, ThrottlerGuard } from '@nestjs/throttler';
|
||||
import databaseConfig from '@/config/database.config';
|
||||
import { FEATURE_MODULES } from '@/feature-modules';
|
||||
import { BusinessModule } from '@/modules/business.module';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
@@ -32,7 +32,7 @@ import { FEATURE_MODULES } from '@/feature-modules';
|
||||
},
|
||||
],
|
||||
}),
|
||||
...FEATURE_MODULES,
|
||||
BusinessModule,
|
||||
],
|
||||
providers: [
|
||||
{
|
||||
|
||||
@@ -8,9 +8,10 @@ import { Observable, map } from 'rxjs';
|
||||
import { ApiResponse } from '@/common/interfaces/api-response.interface';
|
||||
|
||||
@Injectable()
|
||||
export class TransformInterceptor<T>
|
||||
implements NestInterceptor<T, ApiResponse<T>>
|
||||
{
|
||||
export class TransformInterceptor<T> implements NestInterceptor<
|
||||
T,
|
||||
ApiResponse<T>
|
||||
> {
|
||||
intercept(
|
||||
_context: ExecutionContext,
|
||||
next: CallHandler<T>,
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
export const FEATURE_MODULES = [];
|
||||
6
src/modules/business.module.ts
Normal file
6
src/modules/business.module.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
|
||||
@Module({
|
||||
imports: [],
|
||||
})
|
||||
export class BusinessModule {}
|
||||
Reference in New Issue
Block a user