diff --git a/Backend/src/app.module.ts b/Backend/src/app.module.ts index 92466c3..acb1639 100644 --- a/Backend/src/app.module.ts +++ b/Backend/src/app.module.ts @@ -2,14 +2,14 @@ * Copyright (c) 2023. Leonardo Migliorelli */ +import { JwtModule } from '@nestjs/jwt'; import { Module } from '@nestjs/common'; import { MachineLearningController } from './app/machineLearning/machineLearning.controller'; import { FrontendController } from './app/frontend/frontend.controller'; import { DatabaseService } from './database/database.service'; import { TelegramService } from './telegram/telegram.service'; -import { JwtModule } from '@nestjs/jwt'; import { LoginController } from './app/login.controller'; -import { CameraStreamModule } from './cameraStream/cameraStream.module'; +import { CameraStreamGateway } from './cameraStream/cameraStream.gateway'; @Module({ imports: [ @@ -19,10 +19,9 @@ import { CameraStreamModule } from './cameraStream/cameraStream.module'; // FIXME Error: Payload as string is not allowed with the following sign options: expiresIn // signOptions: { expiresIn: "60s" }, }), - CameraStreamModule, ], controllers: [MachineLearningController, FrontendController, LoginController], - providers: [DatabaseService, TelegramService], + providers: [DatabaseService, TelegramService, CameraStreamGateway], exports: [DatabaseService, TelegramService], }) export class AppModule {} diff --git a/Backend/src/cameraStream/cameraStream.gateway.spec.ts b/Backend/src/cameraStream/cameraStream.gateway.spec.ts index 04ff551..a806383 100644 --- a/Backend/src/cameraStream/cameraStream.gateway.spec.ts +++ b/Backend/src/cameraStream/cameraStream.gateway.spec.ts @@ -1,5 +1,5 @@ import { Test, TestingModule } from '@nestjs/testing'; -import { CameraStreamGateway } from './cameraStreamGateway'; +import { CameraStreamGateway } from './cameraStream.gateway'; describe('WebrtcGateway', () => { let gateway: CameraStreamGateway; diff --git a/Backend/src/cameraStream/cameraStreamGateway.ts b/Backend/src/cameraStream/cameraStream.gateway.ts similarity index 100% rename from Backend/src/cameraStream/cameraStreamGateway.ts rename to Backend/src/cameraStream/cameraStream.gateway.ts diff --git a/Backend/src/cameraStream/cameraStream.module.ts b/Backend/src/cameraStream/cameraStream.module.ts deleted file mode 100644 index af65b7e..0000000 --- a/Backend/src/cameraStream/cameraStream.module.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Module } from '@nestjs/common'; -import { CameraStreamGateway } from './cameraStreamGateway'; -import { JwtModule } from '@nestjs/jwt'; - -@Module({ - imports: [ - JwtModule.register({ - global: true, - secret: process.env.JWT_SECRET, - // FIXME Error: Payload as string is not allowed with the following sign options: expiresIn - // signOptions: { expiresIn: "60s" }, - }), - ], - providers: [CameraStreamGateway], -}) -export class CameraStreamModule {}