From 47cf35a86a2d848271b7a1168808b338b99b4aa8 Mon Sep 17 00:00:00 2001 From: Glydric Date: Tue, 5 Dec 2023 19:14:27 +0100 Subject: [PATCH] removed useless --- Backend/src/app.module.ts | 7 +++---- .../cameraStream/cameraStream.gateway.spec.ts | 2 +- ...aStreamGateway.ts => cameraStream.gateway.ts} | 0 Backend/src/cameraStream/cameraStream.module.ts | 16 ---------------- 4 files changed, 4 insertions(+), 21 deletions(-) rename Backend/src/cameraStream/{cameraStreamGateway.ts => cameraStream.gateway.ts} (100%) delete mode 100644 Backend/src/cameraStream/cameraStream.module.ts 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 {}