From 95ffce15260dbcfc7a6a94bd55224d1418781637 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9=20=D0=9C=D0=B0?= =?UTF-8?q?=D0=BC=D0=B5=D0=B4=D0=BE=D0=B2?= Date: Wed, 10 Jun 2026 18:35:04 +0300 Subject: [PATCH] fix: redirect / to /login in WebController --- src/web/web.controller.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/web/web.controller.ts b/src/web/web.controller.ts index 6e77a35..2ed445e 100644 --- a/src/web/web.controller.ts +++ b/src/web/web.controller.ts @@ -1,6 +1,6 @@ -import { Controller, Get, Render, Req, UseGuards } from '@nestjs/common'; +import { Controller, Get, Render, Req, UseGuards, Res } from '@nestjs/common'; import { AuthGuard } from '@nestjs/passport'; -import type { Request } from 'express'; +import type { Request, Response } from 'express'; import { Public } from '../common/decorators/public.decorator'; import { Roles } from '../common/decorators/roles.decorator'; import { RolesGuard } from '../common/guards/roles.guard'; @@ -12,6 +12,12 @@ import { PrismaService } from '../prisma/prisma.service'; export class WebController { constructor(private readonly prisma: PrismaService) {} + @Public() + @Get() + root(@Res() res: Response) { + res.redirect('/login'); + } + @Public() @Get('login') @Render('auth/login')