streamer service: split to separate files

This commit is contained in:
Jurgis Sakalauskas
2022-12-15 11:00:15 +02:00
parent 72c5684da9
commit 2fb78b61c4
14 changed files with 204 additions and 128 deletions
+8 -4
View File
@@ -1,12 +1,16 @@
import { Injectable } from '@nestjs/common';
import { Request, Response } from 'express';
import { StreamerService } from './streamer.service';
import { FileStreamerService } from './StreamerService/file-streamer.service';
@Injectable()
export class StreamerFacade {
constructor(private readonly streamerService: StreamerService) {}
constructor(private readonly fileStreamerService: FileStreamerService) {}
streamFile(request: Request, response: Response, filePath: string): void {
this.streamerService.streamFile(request, response, filePath);
async streamFile(
request: Request,
response: Response,
filePath: string,
): Promise<void> {
return this.fileStreamerService.streamFile(request, response, filePath);
}
}