diff --git a/apps/server/src/modules/tldraw/controller/api-test/tldraw.controller.api.spec.ts b/apps/server/src/modules/tldraw/controller/api-test/tldraw.controller.api.spec.ts index 6fa1131a1d0..fbd5fa47cc4 100644 --- a/apps/server/src/modules/tldraw/controller/api-test/tldraw.controller.api.spec.ts +++ b/apps/server/src/modules/tldraw/controller/api-test/tldraw.controller.api.spec.ts @@ -8,11 +8,11 @@ import { ConfigModule } from '@nestjs/config'; import { createConfigModuleOptions } from '@src/config'; import { config } from '@src/modules/tldraw/config'; import * as Utils from '../../utils/utils'; -import { TldrawController } from '../tldraw.controller'; +import { TldrawWsController } from '../tldraw-ws.controller'; describe('WebSocketController (WsAdapter)', () => { let app: INestApplication; - let gateway: TldrawController; + let gateway: TldrawWsController; let ws: WebSocket; const gatewayPort = 3346; @@ -44,9 +44,9 @@ describe('WebSocketController (WsAdapter)', () => { const imports = [CoreModule, ConfigModule.forRoot(createConfigModuleOptions(config))]; const testingModule = await Test.createTestingModule({ imports, - providers: [TldrawController], + providers: [TldrawWsController], }).compile(); - gateway = testingModule.get(TldrawController); + gateway = testingModule.get(TldrawWsController); app = testingModule.createNestApplication(); app.useWebSocketAdapter(new WsAdapter(app)); await app.init(); diff --git a/apps/server/src/modules/tldraw/controller/index.ts b/apps/server/src/modules/tldraw/controller/index.ts index 61d6fc675d9..af9f4b335f5 100644 --- a/apps/server/src/modules/tldraw/controller/index.ts +++ b/apps/server/src/modules/tldraw/controller/index.ts @@ -1 +1 @@ -export * from './tldraw.controller'; +export * from './tldraw-ws.controller'; diff --git a/apps/server/src/modules/tldraw/controller/tldraw.gateway.spec.ts b/apps/server/src/modules/tldraw/controller/tldraw-ws.controller.spec.ts similarity index 98% rename from apps/server/src/modules/tldraw/controller/tldraw.gateway.spec.ts rename to apps/server/src/modules/tldraw/controller/tldraw-ws.controller.spec.ts index 03b37a9d384..9bfb41ffec3 100644 --- a/apps/server/src/modules/tldraw/controller/tldraw.gateway.spec.ts +++ b/apps/server/src/modules/tldraw/controller/tldraw-ws.controller.spec.ts @@ -14,11 +14,11 @@ import { TextEncoder } from 'util'; import * as SyncProtocols from 'y-protocols/sync'; import * as AwarenessProtocol from 'y-protocols/awareness'; import { encoding } from 'lib0'; -import { TldrawController } from '.'; +import { TldrawWsController } from '.'; -describe('TldrawGateway', () => { +describe('TldrawWSConytoller', () => { let app: INestApplication; - let gateway: TldrawController; + let gateway: TldrawWsController; let ws: WebSocket; const gatewayPort = 3346; @@ -39,10 +39,10 @@ describe('TldrawGateway', () => { const imports = [CoreModule, ConfigModule.forRoot(createConfigModuleOptions(config))]; const testingModule = await Test.createTestingModule({ imports, - providers: [TldrawController], + providers: [TldrawWsController], }).compile(); - gateway = testingModule.get(TldrawController); + gateway = testingModule.get(TldrawWsController); app = testingModule.createNestApplication(); app.useWebSocketAdapter(new WsAdapter(app)); jest.useFakeTimers({ advanceTimers: true, doNotFake: ['setInterval', 'clearInterval', 'setTimeout'] }); diff --git a/apps/server/src/modules/tldraw/controller/tldraw.controller.ts b/apps/server/src/modules/tldraw/controller/tldraw-ws.controller.ts similarity index 96% rename from apps/server/src/modules/tldraw/controller/tldraw.controller.ts rename to apps/server/src/modules/tldraw/controller/tldraw-ws.controller.ts index cb758bb9527..7b120552976 100644 --- a/apps/server/src/modules/tldraw/controller/tldraw.controller.ts +++ b/apps/server/src/modules/tldraw/controller/tldraw-ws.controller.ts @@ -7,7 +7,7 @@ import { WsCloseCodeEnum } from '@src/modules/tldraw/types/ws-close-code-enum'; import { setupWSConnection, setPersistence, updateDocument } from '../utils'; @WebSocketGateway(SOCKET_PORT) -export class TldrawController implements OnGatewayInit, OnGatewayConnection { +export class TldrawWsController implements OnGatewayInit, OnGatewayConnection { @WebSocketServer() server!: Server; diff --git a/apps/server/src/modules/tldraw/tldraw.module.ts b/apps/server/src/modules/tldraw/tldraw.module.ts index c4a55ed89b9..a6e05901d5e 100644 --- a/apps/server/src/modules/tldraw/tldraw.module.ts +++ b/apps/server/src/modules/tldraw/tldraw.module.ts @@ -3,13 +3,13 @@ import { ConfigModule } from '@nestjs/config'; import { createConfigModuleOptions } from '@src/config'; import { CoreModule } from '@src/core'; import { Logger } from '@src/core/logger'; -import { TldrawController } from './controller'; +import { TldrawWsController } from './controller'; import { config } from './config'; const imports = [CoreModule, ConfigModule.forRoot(createConfigModuleOptions(config))]; @Module({ imports, - providers: [Logger, TldrawController], + providers: [Logger, TldrawWsController], }) export class TldrawModule {}