fix(server): app cannot start in graphql only flavor (#6598)

This commit is contained in:
liuyi 2024-04-17 18:29:04 +08:00 committed by GitHub
parent 4b933466f4
commit 07aeab6ac8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -124,13 +124,12 @@ function buildAppModule() {
.use(DocModule)
// sync server only
.useIf(config => config.flavor.sync, SyncModule)
.useIf(config => config.flavor.sync, WebSocketModule, SyncModule)
// graphql server only
.useIf(
config => config.flavor.graphql,
ServerConfigModule,
WebSocketModule,
GqlModule,
StorageModule,
UserModule,

View File

@ -4,14 +4,15 @@ import { FeatureModule } from '../features';
import { QuotaModule } from '../quota';
import { UserModule } from '../user';
import { AuthController } from './controller';
import { AuthGuard } from './guard';
import { AuthResolver } from './resolver';
import { AuthService } from './service';
import { TokenService, TokenType } from './token';
@Module({
imports: [FeatureModule, UserModule, QuotaModule],
providers: [AuthService, AuthResolver, TokenService],
exports: [AuthService],
providers: [AuthService, AuthResolver, TokenService, AuthGuard],
exports: [AuthService, AuthGuard],
controllers: [AuthController],
})
export class AuthModule {}