|
@@ -1,29 +1,29 @@
|
|
|
-import { Module, OnModuleInit } from '@nestjs/common';
|
|
|
-import { AssetModule } from './api-v1/asset/asset.module';
|
|
|
-import { AlbumModule } from './api-v1/album/album.module';
|
|
|
-import { AppController } from './app.controller';
|
|
|
-import { ScheduleModule } from '@nestjs/schedule';
|
|
|
-import { DomainModule, SearchService } from '@app/domain';
|
|
|
+import { DomainModule } from '@app/domain';
|
|
|
import { InfraModule } from '@app/infra';
|
|
|
+import { Module } from '@nestjs/common';
|
|
|
+import { APP_GUARD } from '@nestjs/core';
|
|
|
+import { ScheduleModule } from '@nestjs/schedule';
|
|
|
+import { AlbumModule } from './api-v1/album/album.module';
|
|
|
+import { AssetModule } from './api-v1/asset/asset.module';
|
|
|
+import { AppService } from './app.service';
|
|
|
import {
|
|
|
AlbumController,
|
|
|
APIKeyController,
|
|
|
+ AppController,
|
|
|
AssetController,
|
|
|
AuthController,
|
|
|
- PersonController,
|
|
|
JobController,
|
|
|
OAuthController,
|
|
|
PartnerController,
|
|
|
+ PersonController,
|
|
|
SearchController,
|
|
|
ServerInfoController,
|
|
|
SharedLinkController,
|
|
|
SystemConfigController,
|
|
|
- UserController,
|
|
|
TagController,
|
|
|
+ UserController,
|
|
|
} from './controllers';
|
|
|
-import { APP_GUARD } from '@nestjs/core';
|
|
|
import { AuthGuard } from './middlewares/auth.guard';
|
|
|
-import { AppCronJobs } from './app.cron-jobs';
|
|
|
|
|
|
@Module({
|
|
|
imports: [
|
|
@@ -54,12 +54,7 @@ import { AppCronJobs } from './app.cron-jobs';
|
|
|
//
|
|
|
{ provide: APP_GUARD, useExisting: AuthGuard },
|
|
|
AuthGuard,
|
|
|
- AppCronJobs,
|
|
|
+ AppService,
|
|
|
],
|
|
|
})
|
|
|
-export class AppModule implements OnModuleInit {
|
|
|
- constructor(private searchService: SearchService) {}
|
|
|
- async onModuleInit() {
|
|
|
- await this.searchService.bootstrap();
|
|
|
- }
|
|
|
-}
|
|
|
+export class AppModule {}
|