Browse Source

fix: avoid reimporting global module

pull/7745/head
mertmit 8 months ago
parent
commit
0a64fb8408
  1. 7
      packages/nocodb/src/modules/auth/auth.module.ts
  2. 4
      packages/nocodb/src/modules/jobs/jobs.module.ts
  3. 4
      packages/nocodb/src/modules/metas/metas.module.ts
  4. 7
      packages/nocodb/src/modules/users/users.module.ts

7
packages/nocodb/src/modules/auth/auth.module.ts

@ -1,17 +1,12 @@
import { forwardRef, Module } from '@nestjs/common'; import { forwardRef, Module } from '@nestjs/common';
import { PassportModule } from '@nestjs/passport'; import { PassportModule } from '@nestjs/passport';
import { GoogleStrategyProvider } from '~/strategies/google.strategy/google.strategy'; import { GoogleStrategyProvider } from '~/strategies/google.strategy/google.strategy';
import { GlobalModule } from '~/modules/global/global.module';
import { UsersService } from '~/services/users/users.service'; import { UsersService } from '~/services/users/users.service';
import { AuthController } from '~/controllers/auth/auth.controller'; import { AuthController } from '~/controllers/auth/auth.controller';
import { MetasModule } from '~/modules/metas/metas.module'; import { MetasModule } from '~/modules/metas/metas.module';
@Module({ @Module({
imports: [ imports: [PassportModule, forwardRef(() => MetasModule)],
forwardRef(() => GlobalModule),
PassportModule,
forwardRef(() => MetasModule),
],
controllers: [ controllers: [
...(process.env.NC_WORKER_CONTAINER !== 'true' ? [AuthController] : []), ...(process.env.NC_WORKER_CONTAINER !== 'true' ? [AuthController] : []),
], ],

4
packages/nocodb/src/modules/jobs/jobs.module.ts

@ -1,4 +1,4 @@
import { forwardRef, Module } from '@nestjs/common'; import { Module } from '@nestjs/common';
import { BullModule } from '@nestjs/bull'; import { BullModule } from '@nestjs/bull';
// Jobs // Jobs
@ -30,11 +30,9 @@ import { JobsEventService as FallbackJobsEventService } from '~/modules/jobs/fal
import { JOBS_QUEUE } from '~/interface/Jobs'; import { JOBS_QUEUE } from '~/interface/Jobs';
import { MetasModule } from '~/modules/metas/metas.module'; import { MetasModule } from '~/modules/metas/metas.module';
import { DatasModule } from '~/modules/datas/datas.module'; import { DatasModule } from '~/modules/datas/datas.module';
import { GlobalModule } from '~/modules/global/global.module';
export const JobsModuleMetadata = { export const JobsModuleMetadata = {
imports: [ imports: [
forwardRef(() => GlobalModule),
DatasModule, DatasModule,
MetasModule, MetasModule,
...(process.env.NC_REDIS_JOB_URL ...(process.env.NC_REDIS_JOB_URL

4
packages/nocodb/src/modules/metas/metas.module.ts

@ -1,7 +1,6 @@
import { forwardRef, Module } from '@nestjs/common'; import { Module } from '@nestjs/common';
import { MulterModule } from '@nestjs/platform-express'; import { MulterModule } from '@nestjs/platform-express';
import multer from 'multer'; import multer from 'multer';
import { GlobalModule } from '~/modules/global/global.module';
import { NC_ATTACHMENT_FIELD_SIZE } from '~/constants'; import { NC_ATTACHMENT_FIELD_SIZE } from '~/constants';
import { ApiDocsController } from '~/controllers/api-docs/api-docs.controller'; import { ApiDocsController } from '~/controllers/api-docs/api-docs.controller';
import { ApiTokensController } from '~/controllers/api-tokens.controller'; import { ApiTokensController } from '~/controllers/api-tokens.controller';
@ -86,7 +85,6 @@ export const metaModuleMetadata = {
fieldSize: NC_ATTACHMENT_FIELD_SIZE, fieldSize: NC_ATTACHMENT_FIELD_SIZE,
}, },
}), }),
forwardRef(() => GlobalModule),
], ],
controllers: [ controllers: [
...(process.env.NC_WORKER_CONTAINER !== 'true' ...(process.env.NC_WORKER_CONTAINER !== 'true'

7
packages/nocodb/src/modules/users/users.module.ts

@ -1,16 +1,11 @@
import { forwardRef, Module } from '@nestjs/common'; import { forwardRef, Module } from '@nestjs/common';
import { PassportModule } from '@nestjs/passport'; import { PassportModule } from '@nestjs/passport';
import { GlobalModule } from '~/modules/global/global.module';
import { UsersService } from '~/services/users/users.service'; import { UsersService } from '~/services/users/users.service';
import { UsersController } from '~/controllers/users/users.controller'; import { UsersController } from '~/controllers/users/users.controller';
import { MetasModule } from '~/modules/metas/metas.module'; import { MetasModule } from '~/modules/metas/metas.module';
@Module({ @Module({
imports: [ imports: [PassportModule, forwardRef(() => MetasModule)],
forwardRef(() => GlobalModule),
PassportModule,
forwardRef(() => MetasModule),
],
controllers: [ controllers: [
...(process.env.NC_WORKER_CONTAINER !== 'true' ? [UsersController] : []), ...(process.env.NC_WORKER_CONTAINER !== 'true' ? [UsersController] : []),
], ],

Loading…
Cancel
Save