diff --git a/packages/backend/server/src/app.module.ts b/packages/backend/server/src/app.module.ts index 22a2ecdede..3948a0b282 100644 --- a/packages/backend/server/src/app.module.ts +++ b/packages/backend/server/src/app.module.ts @@ -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, diff --git a/packages/backend/server/src/core/auth/index.ts b/packages/backend/server/src/core/auth/index.ts index b840a5108c..6e5dcbc2d2 100644 --- a/packages/backend/server/src/core/auth/index.ts +++ b/packages/backend/server/src/core/auth/index.ts @@ -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 {}