From 52f59bcfde2a1063b6386708fe678a114f25548b Mon Sep 17 00:00:00 2001 From: Nevo David Date: Sun, 29 Mar 2026 13:40:05 +0700 Subject: [PATCH] feat: steam url fix --- apps/backend/src/api/routes/public.controller.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/backend/src/api/routes/public.controller.ts b/apps/backend/src/api/routes/public.controller.ts index 7314e458..018ad0f4 100644 --- a/apps/backend/src/api/routes/public.controller.ts +++ b/apps/backend/src/api/routes/public.controller.ts @@ -26,6 +26,7 @@ import { AuthService } from '@gitroom/helpers/auth/auth.service'; import { pricing } from '@gitroom/nestjs-libraries/database/prisma/subscriptions/pricing'; import { Readable, pipeline } from 'stream'; import { promisify } from 'util'; +import { OnlyURL } from '@gitroom/nestjs-libraries/dtos/webhooks/webhooks.dto'; const pump = promisify(pipeline); @@ -183,10 +184,11 @@ export class PublicController { @Get('/stream') async streamFile( - @Query('url') url: string, + @Query() query: OnlyURL, @Res() res: Response, @Req() req: Request ) { + const { url } = query; if (!url.endsWith('mp4')) { return res.status(400).send('Invalid video URL'); } @@ -219,7 +221,6 @@ export class PublicController { try { await pump(Readable.fromWeb(r.body as any), res); - } catch (err) { - } + } catch (err) {} } }